Age | Commit message (Collapse) | Author | |
---|---|---|---|
2014-09-19 | Fix PAUSE/RESUME in file transfers | sin | |
The doc lies, if the receiver resumes a transfer you get a control packet with send_receive == 1 and control_type == TOX_FILECONTROL_ACCEPT. We keep state locally and move from PAUSED to INPROGRESS when the above happens. | |||
2014-09-19 | Add TRANSFER_PAUSED state | sin | |
Doesn't quite work yet though. | |||
2014-09-19 | Inform the user when a transfer is in progress | sin | |
2014-09-19 | Fix file transfers + texting to use O_RDONLY for FIFOs | sin | |
Just re-open them to clear EOF. | |||
2014-09-19 | Change global in-fifos from O_RDWR to O_RDONLY | FRIGN | |
O_RDWR is a dirty hack to get around the issue of infinite EOFs while reading an in-FIFO. Instead, stop breaking POSIX and set the FIFOs to O_RDONLY. In case a read returns EOF (r == 0), we reopen the fd. Same will be applied to the friend-fifos (especially file_in), helping us get rid of strange timeouts and heuristics and rather solve the problem the POSIX-way. The only downside to this is that we are blind for writes to the in-FIFOs between catching read == 0 and close(), but this is not an issue. To make reopening as easy as possible, I added a dirfd to all slots. While at it, I changed the initial setup and removed the chdir() in favor of the POSIX-2008-compliant *at-functions. This lets us do stuff without having to use snprintf to build paths and is more bulletproof even in case the directory is renamed. | |||
2014-09-18 | Missed some more | sin | |
2014-09-18 | No need to specify modes, default to 0644 and 0777 | sin | |
2014-09-18 | OUT_F is reserved for the edge-case where we don't know if OUT is a STATIC ↵ | sin | |
or FOLDER So use STATIC here. | |||
2014-09-18 | Print a message when we reject a friend request | sin | |
2014-09-18 | Allow the user to reject a friend request | sin | |
2014-09-18 | We need O_WRONLY for text_out as well | sin | |
2014-09-18 | Remember to ftruncate() before updating the files | sin | |
2014-09-18 | Remove writeline() | sin | |
2014-09-18 | We can't use TAILQ_REMOVE inside TAILQ_FOREACH | sin | |
2014-09-18 | Add fifos for incoming requests and remove cmd-parser | FRIGN | |
2014-09-18 | Rework file-transfers | sin | |
For aborted transfers, we will have to move the transfer to the TRANSFER_KILLED state. Then we'll have to wait until the input FIFO stops being readable (the user ^C the transfer). Only then can we move to TRANSFER_NONE. If we move to TRANSFER_NONE immediately then we will initiate a new transfer which we don't want to do. The basic idea is: If we move into the TRANSFER_KILLED state and timeout has expired (50ms?) without the fd being readable (the user did a ^C on cat file > file_in) then move the transfer to TRANSFER_NONE state. | |||
2014-09-17 | Fix wall of gcc-warnings | FRIGN | |
2014-09-17 | Rename ratatox to ratox | sin | |
2014-09-17 | Save state to `.ratatox.data' | sin | |
Makes it a bit more difficult to accidentally delete it and the user can't really interact with it so make it hidden. | |||
2014-09-17 | Fix FIFO craziness | sin | |
2014-09-17 | Fix select() spin | sin | |
2014-09-17 | Ensure proper permissions on request/out | sin | |
2014-09-17 | Remember to ftruncate() before dprintf() | sin | |
2014-09-17 | Rework data-structures | FRIGN | |
2014-09-17 | It is text_out not textout | sin | |
2014-09-17 | Use upper-case when printing IDs | sin | |
2014-09-16 | Catch TOX_FAERR_{BADCHECKSUM,SETNEWNOSPAM} | sin | |
2014-09-16 | Add FIFO for sending a friend request | sin | |
2014-09-16 | Rename functions to keep style consistent | sin | |
2014-09-16 | Add comment like we do for the name and id | sin | |
2014-09-16 | Add support for changing the status message | sin | |
2014-09-16 | Make writeline() more generic | sin | |
2014-09-16 | Make callbacks more generic | sin | |
2014-09-16 | Start using callbacks to make the main loop less ugly | sin | |
2014-09-16 | Name setting and printing the ID are now exposed via the fs | sin | |
We will gradually expose the other commands as well. | |||
2014-09-16 | When initiating a transfer, print the nickname of the friend | sin | |
2014-09-16 | Print message when transfers start | sin | |
2014-09-16 | Detect and cleanup stale transfers | sin | |
2014-09-16 | Only monitor FIFOs for friends that are online | sin | |
Side-effect: If you send a file to a friend that is offline, the write will block() until the friend comes online at which point the file transfer will begin. | |||
2014-09-16 | Correctly terminate transfers | sin | |
2014-09-16 | Remember to free the buffers | sin | |
2014-09-16 | Clean up send_friend_file() | sin | |
2014-09-16 | Add Laslo Hunhold <dev@frign.de> to LICENSE | sin | |
2014-09-16 | Correctly inform the user when the transfer is complete | sin | |
2014-09-16 | Only attempt to send a queued transfer when it is pending | sin | |
2014-09-16 | Implement file sending | sin | |
Initially based on a commit by FRIGN. | |||
2014-09-15 | Pass -DVERSION=\"${VERSION}\" and use that when printing the rat | sin | |
2014-09-15 | Rename printbanner() to printrat() | sin | |
2014-09-15 | Inform the user of the help cmd | sin | |
2014-09-15 | Avoid blank nicknames when printing | sin | |