- 31 Jan, 2014 24 commits
-
-
Philip Withnall authored
This compartmentalises it a little more, reducing the spread of state-changing code from three files down to one. The key change is the switch from using two GSLists of NiceSockets and GSources in Component, to using a single GSList of a struct { NiceSocket, GSource }. This is possible because there is at most one GSource per NiceSocket. This change reduces memory overhead (from the GSList structures) slightly, and makes the relationship between sockets and sources much clearer.
-
Philip Withnall authored
Move all functionality which is unrelated to the GSource into _nice_agent_recv().
-
Philip Withnall authored
This is emitted when one or more streams are removed from the agent due to a call to nice_agent_remove_stream().
-
Philip Withnall authored
A g_usleep() was introduced in commit e22ecb19 to fix a potential race where the non-main threads would finish all their work before the error_loop was started, leaving the error_loop to run for 30s then abort the test. A better fix, instead of doing a racy sleep, is to have the non-main threads spin until the error_loop is running. GLib takes care of all the locking for us, and since we don’t care about efficiency for test cases, spinning is fine (the wait is also going to be quite short).
-
Philip Withnall authored
Add various compiler warnings to the different levels of --enable-compile-warnings. No particular scheme has been used to assign different warnings to different levels, other than that more critical ones are typically enabled at lower levels upwards. All code in libnice except the tests currently compiles with --enable-compile-warnings=error.
-
Philip Withnall authored
This appeases GCC’s -Wswitch-enum warning, and makes it more obvious that those enum cases have been explicitly considered, rather than just forgotten about. This introduces no functional changes.
-
Philip Withnall authored
This appeases GCC’s -Wswitch-enum warning, and makes it more obvious that those enum cases have been explicitly considered, rather than just forgotten about. This introduces no functional changes.
-
Philip Withnall authored
This appeases GCC’s -Wswitch-enum warning, and makes it more obvious that those enum cases have been explicitly considered, rather than just forgotten about. This introduces no functional changes.
-
Philip Withnall authored
GCC warns about this. Might as well prevent the warning.
-
Philip Withnall authored
This appeases GCC’s -Wswitch-enum warning, and makes it more obvious that those enum cases have been explicitly considered, rather than just forgotten about. This introduces no functional changes.
-
Philip Withnall authored
Casting from one struct sockaddr type to another breaks C’s strict aliasing rules (variables of different types cannot alias). Fix this cleanly by using unions of struct sockaddrs to convert between the types (i.e. type-punning). I wish sockaddr didn’t have to be this painful. See: http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Optimize-Options.html#Type_002dpunning
-
Olivier Crête authored
-
Philip Withnall authored
-
Olivier Crête authored
-
Olivier Crête authored
Syncs with libjingle SVN rev 77
-
Olivier Crête authored
-
Olivier Crête authored
-
Olivier Crête authored
-
Olivier Crête authored
-
Olivier Crête authored
This can only be called after we received a packet, where we already adjust the clock
-
Olivier Crête authored
-
Olivier Crête authored
Should improve receive performance a bit. Syncs with libjingle SVN rev 76
-
Olivier Crête authored
Syncs with libjingle SVN rev 56
-
Olivier Crête authored
Also document that fact.
-
- 27 Jan, 2014 1 commit
-
-
Philip Withnall authored
Add to the documentation to note that it can be called several times to set details for several relay servers during discovery.
-
- 07 Jan, 2014 2 commits
-
-
Philip Withnall authored
Do not unconditionally enable -Werror, since that breaks the build for people who have stricter compilation warnings enabled. Instead, add an --enable-compile-warnings configure flag which enables -Werror when passed as --enable-compile-warnings=error. This mimics the flag in gnome-common, for consistency. But we enable errors by default on non-released versions.
-
Livio Madaro authored
-
- 02 Jan, 2014 4 commits
-
-
Philip Withnall authored
This shuts a compiler warning up and allows for format string checking of debug messages.
-
Philip Withnall authored
This fix may not be entirely cross-platform, and I have been unable to test whether it is; making it cross-platform is made more difficult by the fact that the STUN code doesn’t use GLib. The PRIuPTR macro was defined in POSIX:2004, and later in C99. http://pubs.opengroup.org/onlinepubs/009696799/basedefs/inttypes.h.html
-
Philip Withnall authored
-
Philip Withnall authored
It gets automatically generated by autotools, so just gets in the way if checked into git.
-
- 27 Dec, 2013 1 commit
-
-
Olivier Crête authored
Older compilers don't understand all of the flags
-
- 24 Dec, 2013 3 commits
-
-
Olivier Crête authored
-
Olivier Crête authored
-
Olivier Crête authored
It was trying to send queued messages to the final destination instead of going through the TURN server
-
- 23 Dec, 2013 1 commit
-
-
Olivier Crête authored
-
- 18 Dec, 2013 4 commits
-
-
Philip Withnall authored
-
Philip Withnall authored
div() has an aggregate return, which GCC doesn’t like, although this seems like a pretty pointless warning because div_t is the same size as a pointer on 64-bit platforms (probably) and hardly going to cause performance problems by passing it by value. Anyway, it seems easier to simplify the code by using explicit / and % operators inline, than it does to add pragmas and shut the warning up.
-
Philip Withnall authored
If stun_message_append_bytes() is called through stun_message_append_flag(), data will be NULL and len will be 0. This will result in a memcpy(ptr, NULL, 0) call. This probably won’t do any harm (since any reasonable memcpy() implementation will immediately return if (len == 0)), but the standard allows for memcpy() to explode if (data == NULL), regardless of the value of len. In order to be conformant, and to shut up the scan-build static analysis warning about it, only do the memcpy() if (len > 0).
-
Philip Withnall authored
-