diff options
author | FRIGN <dev@frign.de> | 2014-10-17 14:31:08 +0200 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-10-17 15:28:34 +0100 |
commit | a0737ec5a4e6bddef86a7317e06740ed445a00c0 (patch) | |
tree | 9cca7f0e5d7e15221f867a7d75d4d81b3bdfcbcf /toxcore | |
parent | 4f4f6e1320ff996e09a5b78d6431b5ccf80a94bc (diff) |
Refactor call-state management
Checking call_out only and stopping the call as soon as call_out
is gone is not desirable behaviour.
It now keeps up the running call until both call_out and call_in
have been "closed", no matter how or by whom it was started.
This is done by introducing av.state, which is a bit field.
While at it, I also incorporated the transmission-state into it.
toxav_hangup() will now only be called from the one centralized
flag-checking-loop before select, not in the callbacks themselves.
This will also get rid of some race-conditions (more or less).
Previously, call_out was constantly polled as long as the user
was online. Change this to only attempt to open call_out when the
call is initialized. This lowers CPU-usage dramatically.
Diffstat (limited to 'toxcore')
0 files changed, 0 insertions, 0 deletions