From: <jpg...@us...> - 2007-10-04 22:37:37
|
Revision: 1177 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1177&view=rev Author: jpgrayson Date: 2007-10-04 15:37:39 -0700 (Thu, 04 Oct 2007) Log Message: ----------- Fix problem with negative port numbers. There is a mailing list thread describing the problem here: http://sourceforge.net/mailarchive/forum.php?thread_name=46EBD7B4.8070506%40gmail.com&forum_name=iaxclient-devel Modified Paths: -------------- trunk/lib/iaxclient.h trunk/lib/iaxclient_lib.c Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-10-03 21:13:49 UTC (rev 1176) +++ trunk/lib/iaxclient.h 2007-10-04 22:37:39 UTC (rev 1177) @@ -22,7 +22,7 @@ #ifdef __cplusplus extern "C" { #endif - + /*! \file iaxclient.h \brief The IAXClient API @@ -635,7 +635,7 @@ \return The UDP port bound to; -1 if no port or */ -EXPORT short iaxc_get_bind_port(); +EXPORT int iaxc_get_bind_port(); /*! Initializes the IAXClient library Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-10-03 21:13:49 UTC (rev 1176) +++ trunk/lib/iaxclient_lib.c 2007-10-04 22:37:39 UTC (rev 1177) @@ -99,7 +99,7 @@ static MUTEX iaxc_lock; static MUTEX event_queue_lock; -static short iaxci_bound_port = -1; +static int iaxci_bound_port = -1; // default to use port 4569 unless set by iaxc_set_preferred_source_udp_port static int source_udp_port = IAX_DEFAULT_PORTNO; @@ -554,7 +554,7 @@ return iax_video_bypass_jitter(calls[selected_call].session,mode); } -EXPORT short iaxc_get_bind_port() +EXPORT int iaxc_get_bind_port() { return iaxci_bound_port; } @@ -590,7 +590,7 @@ } if ( iaxc_recvfrom == (iaxc_recvfrom_t)recvfrom ) - iaxci_bound_port = (short)port; + iaxci_bound_port = port; else iaxci_bound_port = -1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |