- 21 Aug, 2014 18 commits
-
-
Philip Withnall authored
This is needed for the upcoming new test suite for pseudo-TCP. It shouldn’t be used in normal code — only in tests. Ideally, the pseudo-TCP code should originally never have called g_get_monotonic_time() itself, and should have always taken a time parameter from the caller; then it would be more testable. Unfortunately, API guarantees prevent this from being changed now.
-
Philip Withnall authored
This should make debugging a little clearer.
-
Philip Withnall authored
The on-the-wire flags (FIN, RST, ACK, etc.) should be in an enum to clarify the code a little. This introduces no functional changes.
-
Philip Withnall authored
This tidies things up a little. No functional changes.
-
Philip Withnall authored
-
Philip Withnall authored
This ensures UTF-8 output is printed correctly.
-
Philip Withnall authored
This clarifies the log output a little.
-
Philip Withnall authored
-
Philip Withnall authored
When freeing candidates (component_free_socket_sources()), the sockets which back Component.selected_pair.[local|remote] are closed and their addresses destroyed. Component.selected_pair should be cleared as well to allow calling code to condition on (Component.selected_pair == NULL) to see if it’s invalid.
-
Philip Withnall authored
This introduces no functional changes.
-
Philip Withnall authored
This simplifies the code a little. No functional changes.
-
Philip Withnall authored
Previously, an EWOULDBLOCK return value from the low-level socket calls (including PseudoTcpSocket) would be represented by a zero number of bytes (or messages) read by the agent. This conflicts with the use of zero to represent end of stream (EOS) for pseudo-TCP connections, where the sender has indicated that they are not going to send any more bytes. So, now use GError (G_IO_ERROR_WOULD_BLOCK) to represent EWOULDBLOCK, just like the GSocket functions. Zero is reserved exclusively for if: • the number of requested bytes/messages is zero; or • reliable mode is enabled and EOS is reached. This does change the documented behaviour of the NiceAgent send/recv API, but only by allowing a new behaviour (returning zero) rather than by changing an existing one, so it should be OK.
-
Philip Withnall authored
We’re dealing with unsigned bytes here, not chars. This will become important when adding new TcpOptions numbered from 254 downwards.
-
Philip Withnall authored
New convenience API to check if the remote end of a pseudo-TCP socket has been closed (but not necessarily the local end). This is currently a stub implementation, but will be used fully once pseudo-TCP FIN–ACK support lands.
-
Philip Withnall authored
New convenience API to check if the socket is in state TCP_CLOSED.
-
Philip Withnall authored
By validating state changes, we can verify that the implementation conforms to the RFC 793 state machine at runtime. This will become more important when FIN–ACK support is added, adding more states.
-
Olivier Crête authored
-
Olivier Crête authored
This is to use keepalives to check if the connection is still ongoing. If they don't get a reply, then we can assume that the connection has died. This needs to not happen in the case of ICE-TCP.
-
- 18 Aug, 2014 3 commits
-
-
Olivier Crête authored
The signal is only connected when setting an agent, if no agent has been set, there will be no signal.
-
Philip Withnall authored
ssize_t should definitely be signed, not unsigned.
-
Philip Withnall authored
As spotted by B Andrei on the mailing list.
-
- 14 Aug, 2014 1 commit
-
-
Philip Withnall authored
At that point, (len > 0), since there are conditions above handling the (len == 0) and (len < 0) cases, both of which break from the loop. Coverity issue: #29325
-
- 13 Aug, 2014 2 commits
-
-
Youness Alaoui authored
-
Youness Alaoui authored
-
- 12 Aug, 2014 1 commit
-
-
Olivier Crête authored
Otherwise, it claimed it was connected when the component was in the FAILED state, when it should really have gone to connecting.
-
- 11 Aug, 2014 2 commits
-
-
Olivier Crête authored
-
Olivier Crête authored
-
- 08 Aug, 2014 2 commits
-
-
Philip Withnall authored
-
Youness Alaoui authored
Set candidate pairs from discovered peer-reflx tcp-passive candidates into DISCOVERED state so it doesn't fail if the other side doesn't reply to our binding request
-
- 31 Jul, 2014 1 commit
-
-
Youness Alaoui authored
The retransmissions would timeout after 600ms which caused the TCP connections to timeout before it's able to connect. TCP sockets need to timeout after 8 seconds instead.
-
- 25 Jul, 2014 3 commits
-
-
Olivier Crête authored
This reverts commit 18e5dff4.
-
Youness Alaoui authored
-
Youness Alaoui authored
The pseudo_tcp_socket_get_next_clock returns the next clock in terms of g_get_monotonic_clock / 1000, however, it gets cropped to guint32. When we try to find the interval, by substracting the current time as a guint64, it will return a negative value, which prevents an integer overflow by setting the timeout to 0. This causes the notify_clock timeout to be called all the time by the mainloop, taking 100% of CPU.
-
- 24 Jul, 2014 1 commit
-
-
Olivier Crête authored
This way all the debug can be controlled from one place. Also disable -Wsuggest-attribute=format with -Werror because gcc 4.8.3 erroneously suggested it.
-
- 23 Jul, 2014 6 commits
-
-
Olivier Crête authored
Also add one for pseudotcp-verbose
-
Olivier Crête authored
Send thing one line at a time, so no explicit \n Also make it possible to set a log handler explicitly
-
Youness Alaoui authored
The TURN CreatePermission is a list of multiple permissions but the timer is created and overwrites the old one, so some of them don't get triggered at the right time. This patch was suggested by Livio Madaro. We create a timer for the minimal amount of time, and trigger the retransmissions on the permissions that timed out, then reschedule for the next retransmissions.
-
Livio Madaro authored
-
Youness Alaoui authored
When calling component_emit_io_callback, the agent mutex will be unlocked before the callback is called, this can cause another thread to remove the stream and thus destroying the component. We must verify that the source was not destroyed after calling component_emit_io_callback and avoid accessing the component in that case. Bug report by Stephan Thamm in the mailing list.
-
Youness Alaoui authored
-