[asterisk-commits] tilghman: trunk r298545 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 16 09:29:10 UTC 2010


Author: tilghman
Date: Thu Dec 16 03:29:05 2010
New Revision: 298545

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=298545
Log:
Merged revisions 298539 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r298539 | tilghman | 2010-12-16 03:28:17 -0600 (Thu, 16 Dec 2010) | 8 lines
  
  Ensure the ipaddr field in realtime is large enough to handle IPv6 addresses.
  
  (closes issue #18464)
   Reported by: IgorG
   Patches: 
         realtime_ipv6store.diff uploaded by IgorG (license 20)
         (plus a few additional lines by tilghman)
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=298545&r1=298544&r2=298545
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Dec 16 03:29:05 2010
@@ -4229,7 +4229,7 @@
 static void realtime_update_peer(const char *peername, struct ast_sockaddr *addr, const char *defaultuser, const char *fullcontact, const char *useragent, int expirey, unsigned short deprecated_username, int lastms)
 {
 	char port[10];
-	char ipaddr[INET_ADDRSTRLEN];
+	char ipaddr[INET6_ADDRSTRLEN];
 	char regseconds[20];
 	char *tablename = NULL;
 	char str_lastms[20];
@@ -4436,7 +4436,7 @@
 	struct ast_variable *varregs = NULL;
 	struct ast_variable *tmp;
 	struct ast_config *peerlist = NULL;
-	char ipaddr[INET_ADDRSTRLEN];
+	char ipaddr[INET6_ADDRSTRLEN];
 	char portstring[6]; /*up to 5 digits plus null terminator*/
 	char *cat = NULL;
 	int realtimeregs = ast_check_realtime("sipregs");
@@ -28847,7 +28847,7 @@
 
 	ast_realtime_require_field(ast_check_realtime("sipregs") ? "sipregs" : "sippeers",
 		"name", RQ_CHAR, 10,
-		"ipaddr", RQ_CHAR, 15,
+		"ipaddr", RQ_CHAR, INET6_ADDRSTRLEN - 1,
 		"port", RQ_UINTEGER2, 5,
 		"regseconds", RQ_INTEGER4, 11,
 		"defaultuser", RQ_CHAR, 10,




More information about the asterisk-commits mailing list