small corrections in call clearing
authorAlexandr Anikin <may@telecom-service.ru>
Mon, 25 Jan 2010 21:20:02 +0000 (21:20 +0000)
committerAlexandr Anikin <may@telecom-service.ru>
Mon, 25 Jan 2010 21:20:02 +0000 (21:20 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242933 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/ooh323c/src/ooCalls.c
addons/ooh323c/src/oochannels.c
addons/ooh323c/src/ooh323.c

index 3984abc..6648c3f 100644 (file)
@@ -371,10 +371,11 @@ int ooCleanCall(OOH323CallData *call)
        }
    }
 
-   pctxt = call->msgctxt;
-   freeContext(pctxt);
-   free(pctxt);
-   call->msgctxt = NULL;
+   if ((pctxt = call->msgctxt) != NULL) {
+       freeContext(pctxt);
+       free(pctxt);
+       call->msgctxt = NULL;
+   }
 /* May !!!! Fix it !! */
    /* free(pctxt); */
 
index 2b2f0b4..7d8c1ab 100644 (file)
@@ -748,8 +748,9 @@ int ooProcessCallFDSETsAndTimers
            ast_mutex_lock(&call->Lock);
             ooEndCall(call);
            ast_mutex_unlock(&call->Lock);
-           ooStopMonitorCallChannels(call);
      }
+     if(call->callState >= OO_CALL_CLEARED)
+               ooStopMonitorCallChannels(call);
    }
 
    return OO_OK;
index 59b6afd..6cd3d88 100644 (file)
@@ -1595,6 +1595,8 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
                ret = ooH323CallAdmitted (call);
          }
 
+        call->callState = OO_CALL_CONNECTING;
+
         } /* end ret == OO_OK */
          break;