[Freeswitch-branches] [commit] r4128 - freeswitch/branches/anthonyl/fs-branch/src

Freeswitch SVN anthonyl at freeswitch.org
Mon Feb 5 22:01:59 EST 2007


Author: anthonyl
Date: Mon Feb  5 22:01:59 2007
New Revision: 4128

Modified:
   freeswitch/branches/anthonyl/fs-branch/src/switch_stun.c

Log:
use sizeof(buf) for switch_socket_recvfrom

Modified: freeswitch/branches/anthonyl/fs-branch/src/switch_stun.c
==============================================================================
--- freeswitch/branches/anthonyl/fs-branch/src/switch_stun.c	(original)
+++ freeswitch/branches/anthonyl/fs-branch/src/switch_stun.c	Mon Feb  5 22:01:59 2007
@@ -327,7 +327,7 @@
 
 	for(;;) {
 		bytes = sizeof(buf);
-		if (switch_socket_recvfrom(from_addr, sock, 0, (char *)&buf, &bytes) == SWITCH_STATUS_SUCCESS && bytes > 0) {
+		if (switch_socket_recvfrom(from_addr, sock, 0, (char *)&buf, sizeof(buf)) != SWITCH_STATUS_SUCCESS) {
 			break;
 		}
 



More information about the Freeswitch-branches mailing list