summaryrefslogtreecommitdiffstats
path: root/qacp.c
Commit message (Collapse)AuthorAgeFilesLines
* Prevent copying multiple files over one remote fileNathan Straz2013-10-021-40/+15
| | | | | Also drop the rstat of the parent directory, just let the remote side send us an error.
* Handle errors better in qacpNathan Straz2013-10-021-42/+65
| | | | | | | Pass errors up from the transfer functions so we can keep track of errors and continue trying to transfer all files. Make output more consistent and all on stderr.
* Clean up command line options and usageNathan Straz2013-10-021-19/+9
| | | | We never did support recursive copy and probably never will.
* Handle short writes during qacp receiveNathan Straz2013-10-021-15/+17
|
* Remove offset from data packetNathan Straz2013-10-021-4/+1
| | | | | We really don't need this field since we always copy data sequentially.
* Rewrite qacp receive file to handle all packetsNathan Straz2013-10-021-41/+62
|
* Rewrite send file to handle all packetsNathan Straz2013-10-021-44/+70
| | | | | | | | | This change breaks the qacp protocol! Before there was a chance we would exit before receiving and checking all packets from qarshd. Now we look at all packets and check them. Use data allow packets and larger buffers. Handle errors on the write end.
* Close qacp_fd in the function that openned it.Nathan Straz2013-09-191-2/+1
| | | | | We are already closing it in recvfiles because we could create multiple connections. This caused us to close the fd twice.
* Creat a thin logging layerNathan Straz2013-09-191-0/+12
| | | | | | | When qarshd is run via xinetd, stderr still goes out the socket and messages from sockutil.c or qarsh_packet.c can interfere with the protocol. Create a thin wrapper which qacp and qarsh can send to stderr and qarshd can send to syslog.
* Don't free basename pointer, it wasn't malloc'dNathan Straz2013-09-171-1/+0
|
* Increase buffer and packet sizesNathan Straz2013-09-161-1/+1
| | | | | | | | | This coordinates the buffer sizes with the max packet size. qarshd and qarsh will probably break if this value does not match between client and server builds. Also increase the value to reduce overhead. A max packet size of 16k only yields 40MB/s. Increase that to 128k and we can do 500MB/s.
* Remove unused defineNathan Straz2013-09-111-1/+0
|
* More memory allocation cleanup in qacpNathan Straz2013-09-111-65/+62
| | | | | | Net removal of 12 strdup calls rstat is properly freed Don't need to strdup for basename, the original is not modified
* Clean up memory leaks on sendNathan Straz2013-09-111-9/+5
|
* Remove complicated remote file descriptor codeNathan Straz2013-09-111-2/+2
| | | | | | | | Only handle one file transfer at a time so we don't need an array to track multiple transfers or know the remote's fd number. Loop in recv_packet until we read a whole packet.
* Get qacp remote to local workingNathan Straz2013-09-111-29/+19
|
* Get qacp local to remote working on main socketNathan Straz2013-09-111-47/+41
| | | | | | | | | | I removed the buffering layer from recv_packet because it made the logic too complex around the pselect in qarshd. Now only read as much as needed to get each packet. qarshd adds an array for remote file descriptors which is only a stub for now. This needs to be expanded to allow multiple file transfers at the same time for runcmd.
* Move packet sequence numbering to send_packetNathan Straz2013-09-111-4/+0
|
* Move to a new port for the new protocolNathan Straz2013-09-111-1/+1
| | | | I don't see any way to coexist with the old "protocol"
* Fill in sequence numbers with a real sequenceNathan Straz2012-12-181-3/+5
|
* First crack at ipv6/ipv4 agnostic qarsh/qacp.Dean Jansa2010-09-281-4/+5
|
* [qacp] Fix improper free when connect failsNathan Straz2009-02-051-5/+5
| | | | | Freeing from the middle of an allocated string is not right. Keep a pointer to the strdup so we can free it correctly.
* [qacp] Check that we have two or more pathsNathan Straz2008-12-011-1/+1
|
* [qacp] Fix double-free when copying file to fileNathan Straz2008-10-141-1/+1
| | | | | A previous commit added tmprstatp, which wasn't being checked just after it was assigned.
* Fix the memory leak fix. The first attempt broke multiple file copy support. ↵Dean Jansa2008-10-101-4/+7
| | | | | | sendfiles should be re-written and broken into single file and multi-file cases to make this cleaner. Signed-off-by: Dean Jansa <djansa@redhat.com>
* Fix Copyright lines. vi sure doesn't like that copyright symbol in my termDean Jansa2008-09-231-1/+1
|
* Plug some memory leaksDean Jansa2008-09-231-7/+29
|
* Fix fallback buffer sizes. What was I thinking?Nate Straz2008-09-231-1/+1
|
* Update copyright dates.Nate Straz2008-09-231-1/+1
|
* Cast off_t variables to long long int when printing so we don't get theNate Straz2008-09-231-5/+5
| | | | | | | | ugly warnings. We should always be compiling with 64-bit off_t's so this should not be a problem. Change nread and nwrote back to ssize_t's since that is what read and write return. nleft remains an off_t because we initialize to stat.st_size.
* sendfile() can only send about 2GB, but you can keep calling it untilNate Straz2008-09-231-2/+4
| | | | everything is sent.
* Use off_t instead of size_t so we can transfer files larger than 2GB.Nate Straz2008-09-231-1/+1
| | | | | | I changed all formats from %zd to %lld, but this adds a lot of warnings because off_t isn't the same as long long int to the compiler. I don't know if there is a way to avoid the warnings on all platforms.
* Add fallback to read/write when sendfile doesn't work.Nate Straz2008-09-231-0/+31
|
* Add copyright notices and GPL headerNate Straz2008-09-231-0/+17
|
* Clean up printing of file xfers.Dean Jansa2008-09-231-13/+13
|
* Merge qarsh revisions 1727:1738 from sistina-test branch djansa-qarsh.Nate Straz2008-09-231-60/+271
|
* Flatten the qarsh tree.Nate Straz2008-09-231-0/+382