[svn-commits] may: branch may/ooh323_ipv6 r293885 - in /team/may/ooh323_ipv6: ./ addons/ ad...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Nov 3 16:33:46 CDT 2010


Author: may
Date: Wed Nov  3 16:33:42 2010
New Revision: 293885

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=293885
Log:
simple tests are work, rtp and signalling are right, search client
support h323 with ipv6

Added:
    team/may/ooh323_ipv6/todo   (with props)
Modified:
    team/may/ooh323_ipv6/addons/chan_ooh323.c
    team/may/ooh323_ipv6/addons/ooh323c/src/ooh323.c
    team/may/ooh323_ipv6/addons/ooh323c/src/ooq931.c

Modified: team/may/ooh323_ipv6/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/addons/chan_ooh323.c?view=diff&rev=293885&r1=293884&r2=293885
==============================================================================
--- team/may/ooh323_ipv6/addons/chan_ooh323.c (original)
+++ team/may/ooh323_ipv6/addons/chan_ooh323.c Wed Nov  3 16:33:42 2010
@@ -3886,8 +3886,7 @@
 
 int configure_local_rtp(struct ooh323_pvt *p, ooCallData *call)
 {
-	char *lhost = NULL;
-	char *lport = NULL;
+	char *lhost=NULL, *lport=NULL;
 	struct ast_sockaddr tmp;
 	ooMediaInfo mediaInfo;
 	int x;
@@ -3910,8 +3909,10 @@
 		}
 		/* figure out our local RTP port and tell the H.323 stack about it*/
 		ast_rtp_instance_get_local_address(p->rtp, &tmp);
-		lhost = ast_sockaddr_stringify_host(&tmp);
+		/* lhost = ast_sockaddr_stringify_host(&tmp);*/
+		lhost = gIP;
 		lport = ast_sockaddr_stringify_port(&tmp);
+		ast_verbose("rtp address: %s:%s\n", lhost, lport);
 
 		if (p->rtptimeout) {
 			ast_rtp_instance_set_timeout(p->rtp, p->rtptimeout);

Modified: team/may/ooh323_ipv6/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/addons/ooh323c/src/ooh323.c?view=diff&rev=293885&r1=293884&r2=293885
==============================================================================
--- team/may/ooh323_ipv6/addons/ooh323c/src/ooh323.c (original)
+++ team/may/ooh323_ipv6/addons/ooh323c/src/ooh323.c Wed Nov  3 16:33:42 2010
@@ -502,7 +502,7 @@
       }
 
       ip6 = &setup->sourceCallSignalAddress.u.ip6Address->ip;
-      inet_ntop(AF_INET6, ip->data, call->remoteIP, INET6_ADDRSTRLEN);
+      inet_ntop(AF_INET6, ip6->data, call->remoteIP, INET6_ADDRSTRLEN);
       call->remotePort =  setup->sourceCallSignalAddress.u.ip6Address->port;
      } else {
       if(setup->sourceCallSignalAddress.t != T_H225TransportAddress_ipAddress)

Modified: team/may/ooh323_ipv6/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/addons/ooh323c/src/ooq931.c?view=diff&rev=293885&r1=293884&r2=293885
==============================================================================
--- team/may/ooh323_ipv6/addons/ooh323c/src/ooq931.c (original)
+++ team/may/ooh323_ipv6/addons/ooh323c/src/ooq931.c Wed Nov  3 16:33:42 2010
@@ -2169,7 +2169,7 @@
    OOCTXT *pctxt;
    OOH323CallData *call;
    int ret=OO_OK, i=0, irand=0;
-   char tmp[30]="\0";
+   char tmp[2+8*4+7]="\0";
    char *ip=NULL, *port = NULL;
    struct timeval tv;
    struct timespec ts;
@@ -2216,7 +2216,7 @@
    }
 
 
-   ret = ooParseDestination(call, dest, tmp, 24, &call->remoteAliases);
+   ret = ooParseDestination(call, dest, tmp, 2+8*4+7, &call->remoteAliases);
    if(ret != OO_OK)
    {
       OOTRACEERR2("Error: Failed to parse the destination string %s for "
@@ -2228,7 +2228,7 @@
    /* Check whether we have ip address */
    if(!ooUtilsIsStrEmpty(tmp)) {
       ip = tmp;
-      port = strchr(tmp, ':');
+      port = strrchr(tmp, ':');
       *port = '\0';
       port++;
       strcpy(call->remoteIP, ip);
@@ -2926,7 +2926,7 @@
    H225Facility_UUIE *facility=NULL;
    OOCTXT *pctxt = &gH323ep.msgctxt;
    OOH323CallData *call;
-   char ip[30]="\0", *pcPort=NULL;
+   char ip[2+8*4+7]="\0", *pcPort=NULL;
    H225TransportAddress_ipAddress *fwdCallSignalIpAddress;
    H225TransportAddress_ip6Address *fwdCallSignalIp6Address;
 
@@ -2947,7 +2947,7 @@
      return OO_FAILED;
    }
 
-   ret = ooParseDestination(call, dest, ip, 20, 
+   ret = ooParseDestination(call, dest, ip, 2+8*4+7, 
                                              &call->pCallFwdData->aliases);
    if(ret != OO_OK)
    {
@@ -2959,7 +2959,7 @@
 
    if(!ooUtilsIsStrEmpty(ip))
    {
-      pcPort = strchr(ip, ':');
+      pcPort = strrchr(ip, ':');
       if(pcPort)
       {
          *pcPort = '\0';
@@ -3598,6 +3598,17 @@
       return OO_OK;
    }
 
+   if (gH323ep.v6Mode && strstr(dest, "::")) {
+      if(strlen(dest)+1>len)
+      {
+         OOTRACEERR1("Error:Insufficient buffer space for parsed ip - "
+                     "ooParseDestination\n");
+         return OO_FAILED;
+      }
+      strcpy(parsedIP, dest);     
+      return OO_OK;
+   }
+
    /* alias at host */
    strncpy(tmp, dest, sizeof(tmp)-1);
    tmp[sizeof(tmp)-1]='\0';

Added: team/may/ooh323_ipv6/todo
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/todo?view=auto&rev=293885
==============================================================================
--- team/may/ooh323_ipv6/todo (added)
+++ team/may/ooh323_ipv6/todo Wed Nov  3 16:33:42 2010
@@ -1,0 +1,3 @@
+understand about stringify_host
+make accurate ooParseDestination
+ipv4 in ipv6 mode

Propchange: team/may/ooh323_ipv6/todo
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/may/ooh323_ipv6/todo
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/may/ooh323_ipv6/todo
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the svn-commits mailing list