summaryrefslogtreecommitdiff
path: root/ratox.c
AgeCommit message (Collapse)Author
2014-10-10Don't spin on request/out/<ID> if we echo anything other than '0' or '1'sin
2014-10-09Fix request- and friend-managementFRIGN
When you got a request, but not accepted it via request/out/... and instead sent a request yourself, it would not remove the FIFO. This patch fixes this behaviour by iterating through the request- list and removing the FIFO if it's still existing. Additionally, actually make it possible to reject requests and re-add your friends later by managing the internal tox-state properly.
2014-10-08Style fixsin
Similar style as for detecting broken file transfers.
2014-10-08Don't close a random fdsin
if (f->rxstate == TRANSFER_INPROGRESS && (fd = openat(f->dirfd, ffiles[FFILE_OUT].name, ffiles[FFILE_OUT].flags, 0666)) == -1 && errno == ENXIO) { ... } else { close(fd); <--- not always appropriate! }
2014-10-08Do a toxav_hangup() like we do elsewheresin
This will trigger the callback and reset toxav internal states accordingly. In the callback we actually call cancelcall().
2014-10-08Fix file-transferssin
2014-10-08Check outfiles if they are still openFRIGN
If not, abort receiving.
2014-10-08Check if the call id is valid before cancelling itsin
2014-10-08Fix build on kfreebsdKill Your TV
2014-10-08Rework state management for audio callssin
No need to try to keep local state, just use toxav_get_call_state(). We now can auto-accept calls by pre-attaching on the call_out FIFO.
2014-10-08A bit more consistent output messagesin
2014-10-08Implement peer timeoutsin
2014-10-08Release call resources with toxav_kill_transmission()sin
Reject calls on both sides to reset states. This still needs to be tested to see if there's any effect of doing that.
2014-10-08Remove debug printf()sin
2014-10-07Simplify user state trackingsin
2014-10-07Refactor user-state-logicFRIGN
2014-10-07Rename ustatus to ustatesin
2014-10-07Correctly inform external scripts of an invalid user statesin
2014-10-07Add support for changing the user state and reporting friend's user statesin
2014-10-07Allocate enough memory to allow copying all the friendssin
2014-10-07Send the actual message when initiating the friend requestsin
2014-10-07Fix possible stack corruption when parsing friend IDssin
2014-10-07Reset fd offset when writing outsin
2014-10-06Nuke leading spacesin
2014-10-06Reset state after hangupsin
2014-10-06Re-order function declssin
2014-10-06Allow to attach aplay after we've initiated a callsin
2014-10-05Factor out check for NULL framesin
2014-10-05Allow simultaneous tx/rx callsin
2014-10-05Clean up calls on shutdownsin
2014-10-05Properly hang up initiating callssin
2014-10-05Fix timing issueFRIGN
I don't know why I missed that 1) of course we have to check tv_sec, not tv_nsec 2) when we do a nanosleep, but use the "now"-val for the lastsent- time, we obviously keep the wrong time. This leads to the program thinking more time elapsed than really has, leading to less nanosleep and thus higher playback-speed. Now this is fixed, and apart from state-transition issues, call-receiving now works perfectly. ;)
2014-10-05Fix units (us -> ms)FRIGN
Got off a factor of a thousand, this would've never worked. Now it should handle the calls properly.
2014-10-05Style fixsin
2014-10-05Add sample-timer for callsFRIGN
2014-10-04Minor stylistic changessin
2014-10-04Add initial outgoing call-supportFRIGN
This works, but the audio is a bit muffled up, which takes some fine-tuning. Also, not all state-transitions are yet taken into account.
2014-10-03Default to 0666 permssin
2014-10-03Clarify semanticssin
2014-10-03Put configurable stuff in config.def.hsin
2014-10-03Up max number of callssin
2014-10-03Fix broken buildsin
2014-10-03Refactor code and prepare multiple callsFRIGN
2014-10-03Simplify cbcallstarted()sin
2014-10-03Implement cbcallending() to properly reset state when we cancel the callsin
2014-10-03Hangup the call on EPIPEsin
If you want to switch to another call or want to change the output device, simply attach another program on the FIFO and kill the first. This could be another instance of aplay/aucat or simply cat.
2014-10-02Stop this madnesssin
2014-10-02Actually fill the status message buffer when creating friendssin
2014-10-02Add cancelrxcall()FRIGN
2014-10-01Fix format specifier for printing nospamsin