[Asterisk-cvs] asterisk/apps app_rpt.c,1.25,1.26

jim at lists.digium.com jim at lists.digium.com
Fri Jan 14 18:49:30 CST 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv30960/apps

Modified Files:
	app_rpt.c 
Log Message:
Fixed another little bug.


Index: app_rpt.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_rpt.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- app_rpt.c	14 Jan 2005 21:57:31 -0000	1.25
+++ app_rpt.c	15 Jan 2005 00:53:17 -0000	1.26
@@ -3,7 +3,7 @@
  * Asterisk -- A telephony toolkit for Linux.
  *
  * Radio Repeater / Remote Base program 
- *  version 0.19 01/14/05
+ *  version 0.20 01/14/05
  * 
  * See http://www.zapatatelephony.org/app_rpt.html
  *
@@ -150,7 +150,7 @@
 #include <tonezone.h>
 #include <linux/zaptel.h>
 
-static  char *tdesc = "Radio Repeater / Remote Base  version 0.19  01/14/2005";
+static  char *tdesc = "Radio Repeater / Remote Base  version 0.20  01/14/2005";
 static char *app = "Rpt";
 
 static char *synopsis = "Radio Repeater/Remote Base Control System";
@@ -4082,7 +4082,21 @@
 		/* if found */
 		if (l != &myrpt->links) 
 		{
-			if (l->chan) ast_softhangup(l->chan,AST_SOFTHANGUP_DEV);
+                        l->disctime = DISC_TIME;
+                        if (l->chan)
+                        {
+                                ast_softhangup(l->chan,AST_SOFTHANGUP_DEV);
+                                l->chan = 0;
+                        }
+                        else
+                        {
+                                remque((struct qelem *) l);
+                                if (!strcmp(myrpt->cmdnode,l->name))
+                                        myrpt->cmdnode[0] = 0;
+                                ast_hangup(l->pchan);
+                                free(l);
+                        }
+                        ast_mutex_unlock(&myrpt->lock);
 			usleep(500000);	
 		} else 
 			ast_mutex_unlock(&myrpt->lock);




More information about the svn-commits mailing list