[asterisk-commits] may: branch 1.10 r328428 - in /branches/1.10: ./ addons/ooh323c/src/ cel/ con...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 15 14:31:13 CDT 2011


Author: may
Date: Fri Jul 15 14:31:09 2011
New Revision: 328428

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

........
  r328427 | may | 2011-07-15 23:22:24 +0400 (Fri, 15 Jul 2011) | 7 lines
  
  small gk processing fixes:
  - decrease for 1 second registration ttl for very low expirations (some
    providers expire few earlier than TTL)
  - delete rrq and registration expire timers on URQ received as we make
    new registration.
........

Modified:
    branches/1.10/   (props changed)
    branches/1.10/addons/ooh323c/src/ooGkClient.c
    branches/1.10/cel/cel_odbc.c   (props changed)
    branches/1.10/configs/cel_odbc.conf.sample   (props changed)
    branches/1.10/sounds/Makefile   (props changed)

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

Propchange: branches/1.10/
------------------------------------------------------------------------------
    svn:mergeinfo = /branches/1.8:328427

Modified: branches/1.10/addons/ooh323c/src/ooGkClient.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.10/addons/ooh323c/src/ooGkClient.c?view=diff&rev=328428&r1=328427&r2=328428
==============================================================================
--- branches/1.10/addons/ooh323c/src/ooGkClient.c (original)
+++ branches/1.10/addons/ooh323c/src/ooGkClient.c Fri Jul 15 14:31:09 2011
@@ -1211,8 +1211,11 @@
 
       if(pGkClient->regTimeout > DEFAULT_TTL_OFFSET)
          regTTL = pGkClient->regTimeout - DEFAULT_TTL_OFFSET;
-      else
-         regTTL = pGkClient->regTimeout;
+      else {
+         regTTL = pGkClient->regTimeout - 1; /* -1 due to some ops expire us few earlier */
+	 if (regTTL <= 0)
+		regTTL = 1;
+      }
 
       cbData = (ooGkClientTimerCb*) memAlloc
                                 (&pGkClient->ctxt, sizeof(ooGkClientTimerCb));
@@ -1260,7 +1263,6 @@
          memFreePtr(&pGkClient->ctxt, pTimer->cbData);
          ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList, pTimer);
          OOTRACEDBGA1("Deleted RRQ Timer.\n");
-         break;
       }
    }
    pGkClient->state = GkClientRegistered;
@@ -1505,8 +1507,10 @@
 int ooGkClientHandleUnregistrationRequest
    (ooGkClient *pGkClient, H225UnregistrationRequest * punregistrationRequest)
 {
-   int iRet=0;
-
+   int iRet=0, x;
+   OOTimer *pTimer = NULL;
+   DListNode *pNode = NULL;
+ 
    /* Lets first send unregistration confirm message back to gatekeeper*/
    ooGkClientSendUnregistrationConfirm(pGkClient, 
                                       punregistrationRequest->requestSeqNum);
@@ -1527,6 +1531,24 @@
       OOTRACEINFO1("Sending fresh RRQ - as unregistration request received\n");
       pGkClient->rrqRetries = 0;
       pGkClient->state = GkClientDiscovered;
+
+
+      /* delete the corresponding RRQ & REG timers */
+	pNode = NULL;
+	for(x=0; x<pGkClient->timerList.count; x++) {
+		pNode =  dListFindByIndex(&pGkClient->timerList, x);
+		pTimer = (OOTimer*)pNode->data;
+		if(((ooGkClientTimerCb*)pTimer->cbData)->timerType & OO_RRQ_TIMER) {
+         		memFreePtr(&pGkClient->ctxt, pTimer->cbData);
+         		ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList, pTimer);
+         		OOTRACEDBGA1("Deleted RRQ Timer.\n");
+      		}
+		if(((ooGkClientTimerCb*)pTimer->cbData)->timerType & OO_REG_TIMER) {
+         		memFreePtr(&pGkClient->ctxt, pTimer->cbData);
+         		ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList, pTimer);
+         		OOTRACEDBGA1("Deleted REG Timer.\n");
+      		}
+ 	}
 
       iRet = ooGkClientSendRRQ(pGkClient, 0); 
       if(iRet != OO_OK)

Propchange: branches/1.10/cel/cel_odbc.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 15 14:31:09 2011
@@ -1,1 +1,2 @@
 /be/branches/C.3/cel/cel_adaptive_odbc.c:256426
+/branches/1.8/cel/cel_odbc.c:328427

Propchange: branches/1.10/configs/cel_odbc.conf.sample
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 15 14:31:09 2011
@@ -1,1 +1,2 @@
 /be/branches/C.3/configs/cel_adaptive_odbc.conf.sample:256426
+/branches/1.8/configs/cel_odbc.conf.sample:328427

Propchange: branches/1.10/sounds/Makefile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 15 14:31:09 2011
@@ -1,2 +1,3 @@
 /be/branches/C.3/sounds/Makefile:256426
+/branches/1.8/sounds/Makefile:328427
 /trunk/sounds/Makefile:270974




More information about the asterisk-commits mailing list