aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorjim <jim@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-15 00:53:17 +0000
committerjim <jim@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-15 00:53:17 +0000
commite22e0ead4a8822bda185ea7c36d3d843ce8a9c47 (patch)
tree0c776c85988621a1e7be17894fb223c48f1bfe1f /apps
parente31daabcef274762ce3e04902b88a8c1c33f77d4 (diff)
Fixed another little bug.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4795 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_rpt.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index faafc2048..33c8c0893 100755
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -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 @@ enum {DLY_TELEM, DLY_ID, DLY_UNKEY, DLY_CALLTERM};
#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 @@ static int rpt_exec(struct ast_channel *chan, void *data)
/* 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);