[asterisk-addons-commits] objsys: branch 1.2 r372 -
/branches/1.2/asterisk-ooh323c/src/chan_h323.c
asterisk-addons-commits at lists.digium.com
asterisk-addons-commits at lists.digium.com
Fri Apr 20 14:32:21 MST 2007
Author: objsys
Date: Fri Apr 20 16:32:20 2007
New Revision: 372
URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=372
Log:
destroy update to clearing
Modified:
branches/1.2/asterisk-ooh323c/src/chan_h323.c
Modified: branches/1.2/asterisk-ooh323c/src/chan_h323.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/src/chan_h323.c?view=diff&rev=372&r1=371&r2=372
==============================================================================
--- branches/1.2/asterisk-ooh323c/src/chan_h323.c (original)
+++ branches/1.2/asterisk-ooh323c/src/chan_h323.c Fri Apr 20 16:32:20 2007
@@ -2338,7 +2338,7 @@
ast_cli(fd, "\nObjective Open H.323 Channel Driver's Config:\n");
sprintf(value, "%s:%d", gIP, gPort);
ast_cli(fd, "%-20s%s\n", "IP:Port: ", value);
- ast_cli(fd, "%-20s%d-%d\n", "TCP port range: ",
+ ast_cli(fd, "%-20s%d-%d\n", "H.225 port range: ",
ooconfig.mTCPPortStart, ooconfig.mTCPPortEnd);
ast_cli(fd, "%-20s%s\n", "FastStart", gFastStart?"yes":"no");
ast_cli(fd, "%-20s%s\n", "Tunneling", gTunneling?"yes":"no");
@@ -2747,28 +2747,46 @@
else
iflist = cur->next;
- if(cur->callToken)
+ if(cur->callToken) {
free(cur->callToken);
-
- if(cur->username)
+ cur->callToken = 0;
+ }
+
+ if(cur->username) {
free(cur->username);
-
- if(cur->host)
+ cur->username = 0;
+ }
+
+ if(cur->host) {
free(cur->host);
-
- if(cur->callerid_name)
+ cur->host = 0;
+ }
+
+ if(cur->callerid_name) {
free(cur->callerid_name);
+ cur->callerid_name = 0;
+ }
- if(cur->callerid_num)
+ if(cur->callerid_num) {
free(cur->callerid_num);
-
-
- if (cur->rtp)
+ cur->callerid_num = 0;
+ }
+
+
+ if (cur->rtp) {
ast_rtp_destroy(cur->rtp);
+ cur->rtp = 0;
+ }
/* Unlink us from the owner if we have one */
if (cur->owner) {
- ast_mutex_lock(&cur->owner->lock);
+ while(ast_mutex_trylock(&cur->owner->lock))
+ {
+ ast_log(LOG_DEBUG,"Failed to grab lock, trying again\n");
+ ast_mutex_unlock(&cur->lock);
+ usleep(1);
+ ast_mutex_lock(&cur->lock);
+ }
ast_log(LOG_DEBUG, "Detaching from %s\n", cur->owner->name);
cur->owner->tech_pvt = NULL;
ast_mutex_unlock(&cur->owner->lock);
More information about the asterisk-addons-commits
mailing list