[asterisk-commits] may: trunk r411533 - in /trunk: ./ addons/ addons/ooh323c/src/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 28 13:00:26 CDT 2014


Author: may
Date: Fri Mar 28 13:00:18 2014
New Revision: 411533

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411533
Log:
process stack command even if gatekeeper client isn't register
don't destroy gatekeeper client if it is not started
don't destroy gatekeeper client in some sort of gatekeeper errors
signal rtp create condition when call cleared before rtp structure created

(closes issue ASTERISK-23460)

Reported by: Dmitry Melekhov
Patches:
	ASTERISK-23460-2.patch

Tested by: Dmitry Melekhov
........

Merged revisions 411531 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 411532 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/addons/chan_ooh323.c
    trunk/addons/ooh323c/src/ooCmdChannel.c
    trunk/addons/ooh323c/src/ooGkClient.c
    trunk/addons/ooh323c/src/oochannels.c
    trunk/addons/ooh323c/src/ooh323.c
    trunk/addons/ooh323c/src/ooq931.c

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

Modified: trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_ooh323.c?view=diff&rev=411533&r1=411532&r2=411533
==============================================================================
--- trunk/addons/chan_ooh323.c (original)
+++ trunk/addons/chan_ooh323.c Fri Mar 28 13:00:18 2014
@@ -2202,6 +2202,10 @@
 		ast_channel_unlock(p->owner);
     		p->owner = NULL;
 		ast_module_unref(myself);
+	}
+
+	if (!p->rtp) {
+		ast_cond_signal(&p->rtpcond);
 	}
 
 	ast_set_flag(p, H323_NEEDDESTROY);

Modified: trunk/addons/ooh323c/src/ooCmdChannel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooCmdChannel.c?view=diff&rev=411533&r1=411532&r2=411533
==============================================================================
--- trunk/addons/ooh323c/src/ooCmdChannel.c (original)
+++ trunk/addons/ooh323c/src/ooCmdChannel.c Fri Mar 28 13:00:18 2014
@@ -172,11 +172,6 @@
       if(cmd.type == OO_CMD_NOOP)
          continue;
 
-      if(gH323ep.gkClient && gH323ep.gkClient->state != GkClientRegistered && cmd.type != OO_CMD_STOPMONITOR)
-      {
-         OOTRACEINFO1("Ignoring stack command as Gk Client is not registered"
-                      " yet\n");
-      }
       else {
          switch(cmd.type) {
             case OO_CMD_MAKECALL: 
@@ -336,11 +331,6 @@
       if(cmd.type == OO_CMD_NOOP)
          continue;
 
-      if(gH323ep.gkClient && gH323ep.gkClient->state != GkClientRegistered)
-      {
-         OOTRACEINFO1("Ignoring stack command as Gk Client is not registered"
-                      " yet\n");
-      }
       else {
          switch(cmd.type) {
             case OO_CMD_MAKECALL: 

Modified: trunk/addons/ooh323c/src/ooGkClient.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooGkClient.c?view=diff&rev=411533&r1=411532&r2=411533
==============================================================================
--- trunk/addons/ooh323c/src/ooGkClient.c (original)
+++ trunk/addons/ooh323c/src/ooGkClient.c Fri Mar 28 13:00:18 2014
@@ -210,7 +210,7 @@
    if(iRet != OO_OK)
    {
       OOTRACEERR1("Error:Failed to send GRQ message\n");
-      pGkClient->state = GkClientFailed;
+      pGkClient->state = GkClientGkErr;
       ast_mutex_unlock(&pGkClient->Lock);
       return OO_FAILED;
    }
@@ -433,7 +433,7 @@
       if(iRet != OO_OK)
       {
          OOTRACEERR1("Error: Failed to handle received RAS message\n");
-         pGkClient->state = GkClientFailed;
+         pGkClient->state = GkClientGkErr;
       }
       memReset(pctxt);
    }
@@ -702,7 +702,7 @@
    {
       OOTRACEERR1("Error: Failed to send GRQ message\n");
       memReset(&pGkClient->msgCtxt);
-      pGkClient->state = GkClientFailed;
+      pGkClient->state = GkClientGkErr;
       ast_mutex_unlock(&pGkClient->Lock);
       return OO_FAILED;
    }
@@ -1530,7 +1530,7 @@
    {
       OOTRACEERR1("Error:Failed to send UnregistrationRequest message\n");
       memReset(pctxt);
-      pGkClient->state = GkClientFailed;
+      pGkClient->state = GkClientGkErr;
       ast_mutex_unlock(&pGkClient->Lock);
       return OO_FAILED;
    }
@@ -1909,7 +1909,7 @@
    {
       OOTRACEERR1("Error:Failed to send AdmissionRequest message\n");
       memReset(pctxt);
-      pGkClient->state = GkClientFailed;
+      pGkClient->state = GkClientGkErr;
       ast_mutex_unlock(&pGkClient->Lock);
       return OO_FAILED;
    }
@@ -2423,7 +2423,7 @@
    {
       OOTRACEERR1("Error:Failed to send IRR message\n");
       memReset(pctxt);
-      pGkClient->state = GkClientFailed;
+      pGkClient->state = GkClientGkErr;
       ast_mutex_unlock(&pGkClient->Lock);
       return OO_FAILED;
    }
@@ -2576,7 +2576,7 @@
    if(iRet != OO_OK)
    {
       OOTRACEERR1("Error: Failed to send DRQ message\n");
-      pGkClient->state = GkClientFailed;
+      pGkClient->state = GkClientGkErr;
    }
    
 
@@ -2736,7 +2736,7 @@
    if(ret != OO_OK)
    {
       OOTRACEERR1("Error:Failed to send Additive RRQ message\n");
-      pGkClient->state = GkClientFailed;
+      pGkClient->state = GkClientGkErr;
       return OO_FAILED;
    }
    return OO_OK;

Modified: trunk/addons/ooh323c/src/oochannels.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/oochannels.c?view=diff&rev=411533&r1=411532&r2=411533
==============================================================================
--- trunk/addons/ooh323c/src/oochannels.c (original)
+++ trunk/addons/ooh323c/src/oochannels.c Fri Mar 28 13:00:18 2014
@@ -822,7 +822,8 @@
       if(OO_OK != ooGkClientStart(gH323ep.gkClient))
       {
          OOTRACEERR1("Error:Failed to start Gatekeeper client\n");
-         ooGkClientDestroy();
+	 // not need more, now it can be restarted correctly
+         // ooGkClientDestroy();
       }
    }
    

Modified: trunk/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooh323.c?view=diff&rev=411533&r1=411532&r2=411533
==============================================================================
--- trunk/addons/ooh323c/src/ooh323.c (original)
+++ trunk/addons/ooh323c/src/ooh323.c Fri Mar 28 13:00:18 2014
@@ -1719,12 +1719,12 @@
             if(gH323ep.gkClient->state == GkClientRegistered)
             {
                call->callState = OO_CALL_WAITING_ADMISSION;
+               ast_mutex_lock(&call->GkLock);
                ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient, call, 
                                                     FALSE);
 		tv = ast_tvnow();
                 ts.tv_sec = tv.tv_sec + 24;
 		ts.tv_nsec = tv.tv_usec * 1000;
-	        ast_mutex_lock(&call->GkLock);
 		if (call->callState == OO_CALL_WAITING_ADMISSION)
                    ast_cond_timedwait(&call->gkWait, &call->GkLock, &ts);
                 if (call->callState == OO_CALL_WAITING_ADMISSION)

Modified: trunk/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooq931.c?view=diff&rev=411533&r1=411532&r2=411533
==============================================================================
--- trunk/addons/ooh323c/src/ooq931.c (original)
+++ trunk/addons/ooh323c/src/ooq931.c Fri Mar 28 13:00:18 2014
@@ -2604,11 +2604,11 @@
    {
      if(gH323ep.gkClient->state == GkClientRegistered) {
        call->callState = OO_CALL_WAITING_ADMISSION;
+       ast_mutex_lock(&call->GkLock);
        ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient, call, FALSE);
        tv = ast_tvnow();
        ts.tv_sec = tv.tv_sec + 24;
        ts.tv_nsec = tv.tv_usec * 1000;
-       ast_mutex_lock(&call->GkLock);
        if (call->callState == OO_CALL_WAITING_ADMISSION)
           ast_cond_timedwait(&call->gkWait, &call->GkLock, &ts);
        if (call->callState == OO_CALL_WAITING_ADMISSION)




More information about the asterisk-commits mailing list