Hi,

I noticed that if I change the SIP UDP receive buffer size in the configuration, I always get a warning (the setting seems to be applied OK). It is because the usage of the getsockopt is incorrect. Patch attached (the getsockopt in jsonrpc is OK).

br

Szo
diff --git a/core/sip/udp_trsp.cpp b/core/sip/udp_trsp.cpp
index f924eeb..99532e8 100644
--- a/core/sip/udp_trsp.cpp
+++ b/core/sip/udp_trsp.cpp
@@ -144,8 +144,8 @@ int udp_trsp_socket::set_recvbuf_size(int rcvbuf_size)
 	    WARN("could not set SIP UDP socket buffer: '%s'\n",
 		 strerror(errno));
 	} else {
-	    socklen_t optlen;
 	    int set_rcvbuf_size=0;
+	    socklen_t optlen = sizeof(int);
 	    if (getsockopt(sd, SOL_SOCKET, SO_RCVBUF,
 			   &set_rcvbuf_size, &optlen) == -1) {
 		WARN("could not read back SIP UDP socket buffer length: '%s'\n",
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to