[asterisk-commits] blanchet: branch group/v6 r85154 - /team/group/v6/trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 9 12:34:40 CDT 2007


Author: blanchet
Date: Tue Oct  9 12:34:40 2007
New Revision: 85154

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85154
Log:
changed args to follow guidelines: i.e. use sockaddr_storage for memory allocation, but use sockaddr for passing arguments, and cast between.

Modified:
    team/group/v6/trunk/channels/chan_sip.c

Modified: team/group/v6/trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/channels/chan_sip.c?view=diff&rev=85154&r1=85153&r2=85154
==============================================================================
--- team/group/v6/trunk/channels/chan_sip.c (original)
+++ team/group/v6/trunk/channels/chan_sip.c Tue Oct  9 12:34:40 2007
@@ -1761,7 +1761,7 @@
 static void build_via(struct sip_pvt *p);
 static char *generate_random_string(char *buf, size_t size);
 static void build_callid_pvt(struct sip_pvt *pvt);
-static void build_callid_registry(struct sip_registry *reg, struct sockaddr_storage* ourip, socklen_t ourip_len, const char *fromdomain);
+static void build_callid_registry(struct sip_registry *reg, struct sockaddr *ourip, socklen_t ourip_len, const char *fromdomain);
 static void make_our_tag(char *tagbuf, size_t len);
 static int add_header(struct sip_request *req, const char *var, const char *value);
 static int add_header_contentLength(struct sip_request *req, int len);
@@ -4965,7 +4965,7 @@
 }
 
 /*! \brief Build SIP Call-ID value for a REGISTER transaction */
-static void build_callid_registry(struct sip_registry *reg, struct sockaddr_storage *ourip, socklen_t ourip_len, const char *fromdomain)
+static void build_callid_registry(struct sip_registry *reg, struct sockaddr *ourip, socklen_t ourip_len, const char *fromdomain)
 {
 	char buf[33];
 	char iabuf[NI_MAXHOST] = "<error>";
@@ -8428,7 +8428,7 @@
 	} else {
 		/* Build callid for registration if we haven't registered before */
 		if (!r->callid_valid) {
-			build_callid_registry(r, &internip, internip_len, default_fromdomain);
+			build_callid_registry(r, (struct sockaddr *)&internip, internip_len, default_fromdomain);
 			r->callid_valid = TRUE;
 		}
 		/* Allocate SIP dialog for registration */




More information about the asterisk-commits mailing list