[asterisk-commits] may: branch 10 r331200 - /branches/10/addons/ooh323c/src/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 9 11:36:42 CDT 2011


Author: may
Date: Tue Aug  9 11:36:39 2011
New Revision: 331200

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=331200
Log:
Setup IP proto version for call in GK mode
Added additional check for IP semantics before parse destination
by ast_parse_args due to it can parse numeric as IP.

 (closes issue ASTERISK-18218)
 Reported by: slesru
 Patch: ASTERISK-18218.patch


Modified:
    branches/10/addons/ooh323c/src/ooGkClient.c
    branches/10/addons/ooh323c/src/ooq931.c

Modified: branches/10/addons/ooh323c/src/ooGkClient.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/addons/ooh323c/src/ooGkClient.c?view=diff&rev=331200&r1=331199&r2=331200
==============================================================================
--- branches/10/addons/ooh323c/src/ooGkClient.c (original)
+++ branches/10/addons/ooh323c/src/ooGkClient.c Tue Aug  9 11:36:39 2011
@@ -1947,8 +1947,11 @@
                                     ipAddress->ip.data[1],
                                     ipAddress->ip.data[2],
                                     ipAddress->ip.data[3]);
-         if(strcmp(ip, "0.0.0.0"))
+         if(strcmp(ip, "0.0.0.0")) {
+/* fix this when gk client will adopt to work with IPv6 */
+	    pCallAdmInfo->call->versionIP = 4;
             strcpy(pCallAdmInfo->call->remoteIP, ip);
+	 }
          pCallAdmInfo->call->remotePort = ipAddress->port;
          /* Update call model */
          if(pAdmissionConfirm->callModel.t == T_H225CallModel_direct)

Modified: branches/10/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/addons/ooh323c/src/ooq931.c?view=diff&rev=331200&r1=331199&r2=331200
==============================================================================
--- branches/10/addons/ooh323c/src/ooq931.c (original)
+++ branches/10/addons/ooh323c/src/ooq931.c Tue Aug  9 11:36:39 2011
@@ -3624,7 +3624,8 @@
       return OO_OK;
    }
 
-   if (!ast_parse_arg(dest, PARSE_ADDR, &tmpaddr)) {
+   /* parse direct IP dest */
+   if ((strchr(dest, ':') || strchr(dest,'[') || strchr(dest,'.')) && !ast_parse_arg(dest, PARSE_ADDR, &tmpaddr)) {
       if(strlen(dest)+7>len)
       {
          OOTRACEERR1("Error:Insufficient buffer space for parsed ip - "




More information about the asterisk-commits mailing list