Philip Withnall [Wed, 15 Jan 2014 08:51:28 +0000 (08:51 +0000)]
tests: Fix strict aliasing of sockaddr structures
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 [Sun, 19 Jan 2014 21:56:35 +0000 (16:56 -0500)]
stun: Make the MD5 code strict-aliasing correct
Philip Withnall [Fri, 3 Jan 2014 08:54:31 +0000 (08:54 +0000)]
build: Update .gitignore file
Olivier Crête [Wed, 8 Jan 2014 01:28:50 +0000 (20:28 -0500)]
pseudotcp: Add methods to query the state of the send and recv buffers
Olivier Crête [Fri, 3 Jan 2014 23:08:39 +0000 (18:08 -0500)]
pseudotcp: Implement window scaling for PseudoTCP.
Syncs with libjingle SVN rev 77
Olivier Crête [Mon, 6 Jan 2014 23:32:03 +0000 (18:32 -0500)]
tests: Add more asserts to pseudotcp test
Olivier Crête [Mon, 6 Jan 2014 23:31:46 +0000 (18:31 -0500)]
tests: Use right type when taking to stdio f*() C APIs
Olivier Crête [Mon, 6 Jan 2014 23:31:04 +0000 (18:31 -0500)]
tests: Close pseudosocket as soon as it's done sending
Olivier Crête [Fri, 3 Jan 2014 23:07:55 +0000 (18:07 -0500)]
tests: Fix racy destruction of pseudotcp object
Olivier Crête [Fri, 3 Jan 2014 23:07:34 +0000 (18:07 -0500)]
tests: No need to call adjust_clock in readable
This can only be called after we received a packet, where we already
adjust the clock
Olivier Crête [Fri, 3 Jan 2014 23:06:51 +0000 (18:06 -0500)]
tests: Use one struct for data and buffer
Olivier Crête [Fri, 3 Jan 2014 18:22:02 +0000 (13:22 -0500)]
pseudotcp: Only consolidate recv buffer if it's getting buffer
Should improve receive performance a bit.
Syncs with libjingle SVN rev 76
Olivier Crête [Fri, 3 Jan 2014 18:07:26 +0000 (13:07 -0500)]
pseudotcp: Make it possible to disable the Nagle Algorithm
Syncs with libjingle SVN rev 56
Olivier Crête [Fri, 31 Jan 2014 06:46:40 +0000 (01:46 -0500)]
agent: Don't make relayed sockets available in nice_agent_get_selected_socket()
Also document that fact.
Philip Withnall [Mon, 27 Jan 2014 09:33:51 +0000 (09:33 +0000)]
agent: Note that nice_agent_set_relay_info() can be called many times
Add to the documentation to note that it can be called several times to
set details for several relay servers during discovery.
Philip Withnall [Fri, 1 Nov 2013 10:34:43 +0000 (10:34 +0000)]
build: Don’t unconditionally enable -Werror for non-release builds
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 [Tue, 10 Dec 2013 11:18:03 +0000 (12:18 +0100)]
agent: Read all socket data in nice_agent_g_source_cb
Philip Withnall [Tue, 17 Dec 2013 10:05:17 +0000 (10:05 +0000)]
stun: Add printf function attribute
This shuts a compiler warning up and allows for format string checking
of debug messages.
Philip Withnall [Tue, 17 Dec 2013 09:48:03 +0000 (09:48 +0000)]
stun: Fix format specifier for a size_t variable
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 [Thu, 2 Jan 2014 14:10:11 +0000 (14:10 +0000)]
build: Update .gitignore file
Philip Withnall [Thu, 12 Dec 2013 12:03:46 +0000 (12:03 +0000)]
build: Remove auto-generated INSTALL file
It gets automatically generated by autotools, so just gets in the way if
checked into git.
Olivier Crête [Fri, 27 Dec 2013 02:16:14 +0000 (21:16 -0500)]
configure: Verify that the compiler understands warning cflags
Older compilers don't understand all of the flags
Olivier Crête [Tue, 24 Dec 2013 04:46:15 +0000 (23:46 -0500)]
agent: Add warning on incorrect API usage
Olivier Crête [Tue, 24 Dec 2013 04:22:34 +0000 (23:22 -0500)]
stun: Indications are never authentication when using long term auth
Olivier Crête [Tue, 24 Dec 2013 03:16:18 +0000 (22:16 -0500)]
turn: Send queued TURN messages to the turn server
It was trying to send queued messages to the final destination instead
of going through the TURN server
Olivier Crête [Mon, 23 Dec 2013 23:00:36 +0000 (18:00 -0500)]
conncheck: Avoid reading null username
Philip Withnall [Tue, 17 Dec 2013 09:20:45 +0000 (09:20 +0000)]
examples: Remove g_type_init() call for recent GLib versions
Philip Withnall [Tue, 17 Dec 2013 10:06:10 +0000 (10:06 +0000)]
stun: Fix a use of a function with an aggregate return value
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 [Tue, 17 Dec 2013 09:54:01 +0000 (09:54 +0000)]
stun: Explicitly avoid a memcpy() from NULL
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 [Tue, 17 Dec 2013 10:05:58 +0000 (10:05 +0000)]
stun: Remove unused variables
Philip Withnall [Tue, 17 Dec 2013 09:38:07 +0000 (09:38 +0000)]
agent: Avoid memcpy()ing garbage between username strings
If (username_len > uname_len), memcpy() would fall off the end of the
uname string and copy (username_len - uname_len) bytes of garbage into
username.
Theoretical bug: not actually attempted to be demonstrated in the wild.
Philip Withnall [Tue, 17 Dec 2013 09:36:32 +0000 (09:36 +0000)]
agent: Fix an old-style function declaration
Philip Withnall [Tue, 17 Dec 2013 09:35:31 +0000 (09:35 +0000)]
agent: Avoid a potential NULL pointer dereference
password could be NULL (priv_get_password() can return NULL), but
g_base64_decode() aborts if it receives NULL for the encoded text.
Philip Withnall [Tue, 17 Dec 2013 09:34:36 +0000 (09:34 +0000)]
agent: Fix format specifiers in debug messages
Mostly problems with the specifier for gsize.
Philip Withnall [Tue, 17 Dec 2013 09:35:04 +0000 (09:35 +0000)]
agent: Add missing format specifiers to debug messages
Philip Withnall [Tue, 17 Dec 2013 09:36:51 +0000 (09:36 +0000)]
agent: Add printf function attribute
This shuts a compiler warning up and allows for format string checking
of debug messages. (See future commits for the fixes this has resulted
in.)
Philip Withnall [Tue, 17 Dec 2013 09:27:58 +0000 (09:27 +0000)]
Fix strict aliasing of sockaddr structures
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
Philip Withnall [Tue, 17 Dec 2013 09:24:03 +0000 (09:24 +0000)]
Add missing ‘default’ cases to switches
This shuts GCC’s -Wswitch-default warning, and makes the code flow a
little more explicit.
This introduces no functional changes.
Philip Withnall [Tue, 17 Dec 2013 09:21:39 +0000 (09:21 +0000)]
examples: Remove redundant non-NULL checks
The return value of g_strsplit() can never be NULL.
Philip Withnall [Tue, 17 Dec 2013 09:21:24 +0000 (09:21 +0000)]
Fix variable shadowing
Philip Withnall [Thu, 12 Dec 2013 12:02:53 +0000 (12:02 +0000)]
build: Update .gitignore file
Philip Withnall [Thu, 12 Dec 2013 12:01:22 +0000 (12:01 +0000)]
build: Delete ar-lib in maintainer-clean build target
Philip Withnall [Thu, 12 Dec 2013 11:58:54 +0000 (11:58 +0000)]
build: Update AC_CONFIG_HEADERS instead of AC_CONFIG_HEADER
The latter is deprecated.
Philip Withnall [Thu, 12 Dec 2013 11:30:04 +0000 (11:30 +0000)]
agent: Clarify valid range of stream and component IDs
Valid IDs will never be 0, which is convenient.
Bryce Allen [Wed, 20 Nov 2013 21:46:06 +0000 (16:46 -0500)]
agent: Add API to retrieve the selected GSocket
This should be used only when the protocol has it's own keepalive mechanism
Olivier Crête [Wed, 30 Oct 2013 13:45:55 +0000 (09:45 -0400)]
agent: Getting the local candidates returns a copy, fix the doc
Tim Mooney [Tue, 29 Oct 2013 16:52:12 +0000 (16:52 +0000)]
Add special case to make it compile on Solaris
Olivier Crête [Tue, 29 Oct 2013 16:51:13 +0000 (16:51 +0000)]
Silence aclocal warning by changing the order of the macros
Philip Withnall [Mon, 28 Oct 2013 17:53:29 +0000 (17:53 +0000)]
build: Add GUPnP libraries to Libs.private in pkg-config file
They’re private dependencies which are needed on the linker command line when
linking statically against libnice.
https://bugs.freedesktop.org/show_bug.cgi?id=70965
Philip Withnall [Mon, 28 Oct 2013 13:33:57 +0000 (13:33 +0000)]
build: Update configure.ac according to autoupdate
https://bugs.freedesktop.org/show_bug.cgi?id=70965
Philip Withnall [Mon, 28 Oct 2013 13:30:26 +0000 (13:30 +0000)]
build: Add AM_PROG_AR to configure.ac
This shuts up an automake warning about needing it when using a non-POSIX
archiver.
https://bugs.freedesktop.org/show_bug.cgi?id=70965
Philip Withnall [Mon, 28 Oct 2013 13:29:52 +0000 (13:29 +0000)]
build: Add ‘-I m4’ to ACLOCAL_AMFLAGS
This shuts up an automake warning and ensures that in-tree m4 macros are found
by aclocal.
https://bugs.freedesktop.org/show_bug.cgi?id=70965
Colin Walters [Wed, 4 Sep 2013 13:12:33 +0000 (09:12 -0400)]
autogen.sh: Honor NOCONFIGURE=1
This is adapted from telepathy-logger's autogen.sh. See
http://people.gnome.org/~walters/docs/build-api.txt
for rationale behind NOCONFIGURE=1.
Thammi [Fri, 19 Jul 2013 17:10:21 +0000 (19:10 +0200)]
Fix unitialized variable in nice_agent_parse_remote_candidate_sdp
Livio Madaro [Wed, 3 Apr 2013 12:53:39 +0000 (14:53 +0200)]
Refresh TURN CreatePermission at receiving data in case TURN path is asymetrical.
Rohan Garg [Fri, 22 Mar 2013 05:53:31 +0000 (11:23 +0530)]
Set the minimum GLib version to 2.30 to disable deprecated warnings on newer GLib versions and make sure the maximum allowed GLib version is 2.32
Also actually require 2.30
Livio Madaro [Thu, 7 Mar 2013 16:46:34 +0000 (17:46 +0100)]
Open socket with random port. Use random port to avoid TURN error 437 Allocation Mismatch
Youness Alaoui [Wed, 20 Mar 2013 19:43:51 +0000 (15:43 -0400)]
win32: Add new 0.1.4 symbols to the win32 .def file as well
Youness Alaoui [Sat, 23 Feb 2013 00:56:51 +0000 (19:56 -0500)]
version 0.1.4.1
Youness Alaoui [Sat, 23 Feb 2013 00:28:44 +0000 (19:28 -0500)]
Version 0.1.4
Youness Alaoui [Sat, 23 Feb 2013 00:28:27 +0000 (19:28 -0500)]
Fix documentation
Youness Alaoui [Sat, 23 Feb 2013 00:05:47 +0000 (19:05 -0500)]
Add build instructions to the README
Youness Alaoui [Fri, 22 Feb 2013 23:54:18 +0000 (18:54 -0500)]
Remove debugging print
Youness Alaoui [Thu, 7 Feb 2013 01:27:32 +0000 (20:27 -0500)]
examples: Make input non blocking to allow exit when remote hangs up
Youness Alaoui [Thu, 7 Feb 2013 00:44:02 +0000 (19:44 -0500)]
Do not unref the mainloop until the thread has joined since it could be still using it
Youness Alaoui [Thu, 7 Feb 2013 00:41:38 +0000 (19:41 -0500)]
Export the new nice_agent_get_selected_pair API
Bryce Allen [Thu, 7 Feb 2013 00:40:59 +0000 (19:40 -0500)]
Do not unref the GThread since g_thread_join takes the reference. Also rename the variable.
Youness Alaoui [Tue, 5 Feb 2013 23:28:39 +0000 (18:28 -0500)]
Change the m= line in the SDP to use ICE/SDP dummy type instead of RTP/AVP
Youness Alaoui [Tue, 5 Feb 2013 23:21:39 +0000 (18:21 -0500)]
Add new parsing API, for stream and candidates
Youness Alaoui [Tue, 5 Feb 2013 04:21:55 +0000 (23:21 -0500)]
Add example that uses the new SDP parsing API
Youness Alaoui [Tue, 5 Feb 2013 04:15:00 +0000 (23:15 -0500)]
Adding new SDP parsing and generation API.
This adds nice_agent_set_stream_name, nice_agent_get_stream_name,
nice_agent_generate_local_sdp, nice_agent_parse_remote_sdp.
Youness Alaoui [Tue, 5 Feb 2013 03:14:06 +0000 (22:14 -0500)]
Fix/clean threaded-example
Youness Alaoui [Tue, 5 Feb 2013 03:00:02 +0000 (22:00 -0500)]
Refactor nice_agent_set_stream_tos to use agent_find_stream internal API
Youness Alaoui [Tue, 5 Feb 2013 01:37:54 +0000 (20:37 -0500)]
Add a similar simple example using threads
Youness Alaoui [Tue, 5 Feb 2013 01:07:14 +0000 (20:07 -0500)]
example: Exit on Ctrl-D and send EOS signal to the other end
Youness Alaoui [Mon, 4 Feb 2013 23:42:38 +0000 (18:42 -0500)]
Change license for simple-example
Youness Alaoui [Sat, 2 Feb 2013 00:22:08 +0000 (19:22 -0500)]
Add a simple example to showcase the API thanks to Bryce Allen
Youness Alaoui [Sat, 2 Feb 2013 00:19:23 +0000 (19:19 -0500)]
Cleanup documentation
Youness Alaoui [Sat, 2 Feb 2013 00:18:39 +0000 (19:18 -0500)]
Add nice_agent_get_selected_pair API to NiceAgent
Youness Alaoui [Sat, 2 Feb 2013 00:17:59 +0000 (19:17 -0500)]
Add nice_address_ip_version API to NiceAddress
Jakub Adam [Thu, 6 Dec 2012 21:03:08 +0000 (22:03 +0100)]
Fix username validation in OC2007 mode
Wrong 'inbound' argument was passed into priv_validate_username()
Youness Alaoui [Thu, 6 Dec 2012 21:48:00 +0000 (16:48 -0500)]
Add win32 directory to EXTRA_DIST
Youness Alaoui [Mon, 3 Dec 2012 17:45:01 +0000 (12:45 -0500)]
Add nice_agent_set_port_range to the list of exported API functions
Livio Madaro [Mon, 19 Nov 2012 23:18:49 +0000 (18:18 -0500)]
Manage multiple TURN CreatePermission in parallel
Guillaume Desmottes [Fri, 27 Apr 2012 12:36:03 +0000 (14:36 +0200)]
agent: display NiceComponentState as strings in debug message
https://bugs.freedesktop.org/show_bug.cgi?id=49219
Askar Safin [Mon, 1 Oct 2012 18:36:41 +0000 (14:36 -0400)]
Fix C preprocessor bug
Rohan Garg [Wed, 19 Sep 2012 21:14:54 +0000 (02:44 +0530)]
Fix a minor bug in the dribble mode test
If for some reason the opening of the socket is delayed, or simply takes
too much time, the test will fail. This patch ensures that the test will
only proceed once the socket is open.
Olivier Crête [Fri, 14 Sep 2012 16:54:01 +0000 (12:54 -0400)]
version 0.1.3.1
Olivier Crête [Fri, 14 Sep 2012 01:31:18 +0000 (21:31 -0400)]
version 0.1.3
Olivier Crête [Fri, 14 Sep 2012 01:26:29 +0000 (21:26 -0400)]
Compile the plugin for both GStreamer 0.10 and 1.0
Revert this patch to drop GStreamer 0.10 support
Olivier Crête [Fri, 14 Sep 2012 01:25:42 +0000 (21:25 -0400)]
nicesrc: Use gst_buffer_fill
Olivier Crête [Tue, 7 Aug 2012 00:28:15 +0000 (17:28 -0700)]
The plugin name is not a string anymore
Sjoerd Simons [Sun, 29 Jul 2012 16:33:33 +0000 (18:33 +0200)]
Check gstreamer 1.0 not 0.11
Sjoerd Simons [Sun, 29 Jul 2012 16:31:37 +0000 (18:31 +0200)]
GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING
Olivier Crête [Fri, 27 Jan 2012 17:55:09 +0000 (18:55 +0100)]
Use GstPushSrc as a base class
Olivier Crête [Fri, 27 Jan 2012 17:54:31 +0000 (18:54 +0100)]
Port GStreamer src/sink to 0.11
Livio Madaro [Fri, 3 Aug 2012 13:17:08 +0000 (15:17 +0200)]
Fix gaddr initialization
Olivier Crête [Wed, 6 Jun 2012 20:50:39 +0000 (16:50 -0400)]
Only define _FORTIFY_SOURCE if optimisation is enabled
Youness Alaoui [Mon, 16 Jul 2012 19:44:42 +0000 (15:44 -0400)]
Merge remote-tracking branch 'shadeslayer/dribble_mode'
Rohan Garg [Fri, 29 Jun 2012 19:33:34 +0000 (01:03 +0530)]
Also free the GCond and the GMutex