Age | Commit message (Expand) | Author |
2014-09-22 | Use number of seconds since epoch as a timestamp for naming files uniquely...This breaks if time travel becomes a possibility.
| sin |
2014-09-22 | Use O_RDONLY when opening the datafile | sin |
2014-09-22 | Remeber to truncate datafile in datasave() in case it shrinks | sin |
2014-09-22 | Change datasave() and localinit() to use fd's instead of fp's | FRIGN |
2014-09-22 | Print message before password prompt | sin |
2014-09-22 | Refactor dataload()...Use fd's instead of fp's and simplify the case-handling for encryption.
| FRIGN |
2014-09-22 | Refactor fifoflush()...After the previous simplification of return-values of fiforead()
(exit if there's a more serious issue), fifoflush() can easily
be replaced with a oneliner calling fiforead until it returns 0.
In case 0 is returned, the underlying fifo will have already been
reopened.
| FRIGN |
2014-09-22 | Style fix | sin |
2014-09-22 | Forgot config.def.h | sin |
2014-09-22 | Rename encryptsave to encryptdatafile | sin |
2014-09-22 | Allow to encrypt a plain text data file and vice versa | sin |
2014-09-22 | Inform the user if encryption is enabled but the datafile is not encrypted | sin |
2014-09-22 | Print a newline between the banner and the rest | sin |
2014-09-22 | Allow a client with encrypted support to load non-encrypt datafiles | sin |
2014-09-22 | Just realloc(), don't leak if we get called more than once | sin |
2014-09-22 | Oops | sin |
2014-09-22 | Just check p[0] | sin |
2014-09-22 | Forbid empty passwords, keep looping | sin |
2014-09-22 | Make sure to report when .ratox.data doesn't match our encryption config | sin |
2014-09-22 | Keep asking for password if it doesn't match | sin |
2014-09-22 | Use portable readpassphrase() from OpenSSH | sin |
2014-09-22 | Generate config.h | sin |
2014-09-22 | Add support for encrypted save files | sin |
2014-09-21 | Add IPv6 support...Default to IPv4.
| sin |
2014-09-21 | Lay the ground for IPv6 support | sin |
2014-09-21 | Update nodelist | sin |
2014-09-21 | Only close file descriptors when they are not -1 | sin |
2014-09-21 | Add shutdown() for clean exit...This also sends a broadcast to all friends you went offline,
leading to an immediate event-feedback.
| FRIGN |
2014-09-20 | fiforead() should accept a void * instead of char *...Remove ugly casts.
| sin |
2014-09-20 | Fix off-by-one bugs when calling fiforead()...dirfd should be the first arg to be consistent with other
functions.
| sin |
2014-09-20 | Refactor sendfriendreq()...Put the error-strings in one single data-structure and flush the err-file
every time before a new incoming request, so it's empty when the request
succeeds.
| FRIGN |
2014-09-20 | Implement fiforead()...fiforead() automatically reopens a file-descriptor in case
it returns EOF (return 0).
It returns -1 on error.
| FRIGN |
2014-09-19 | Initialize fdmax | sin |
2014-09-19 | Factor out fifoflush() in a separate func...Also flush the fifo for stalled transfers
| sin |
2014-09-19 | Clear up the enums and fix implicit condition-bug...The OUT_F-type was not clear. Make it easier to see the out-file
has no state (=NONE) and is defined for each slot individually.
Moreover, in the initial creation, the err-file fell through
just because STATIC = 0 and .outfile wasn't defined for it.
It was only coincidence this worked and now we have a much
more bulletproof implementation.
| FRIGN |
2014-09-19 | Handle rejected transfers | sin |
2014-09-19 | Fix PAUSE/RESUME in file transfers...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.
| sin |
2014-09-19 | Add TRANSFER_PAUSED state...Doesn't quite work yet though.
| sin |
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...Just re-open them to clear EOF.
| sin |
2014-09-19 | Change global in-fifos from O_RDWR to O_RDONLY...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.
| FRIGN |
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 or......So use STATIC here.
| sin |
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 |