[asterisk-commits] jdixon: branch jdixon/chan_usbradio-1.4 r156124 - /team/jdixon/chan_usbradio-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Nov 12 04:17:46 CST 2008


Author: jdixon
Date: Wed Nov 12 04:17:46 2008
New Revision: 156124

URL: http://svn.digium.com/view/asterisk?view=rev&rev=156124
Log:
Fixed silly problem with disconnect str

Modified:
    team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c

Modified: team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c?view=diff&rev=156124&r1=156123&r2=156124
==============================================================================
--- team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c Wed Nov 12 04:17:46 2008
@@ -22,7 +22,7 @@
 /*! \file
  *
  * \brief Radio Repeater / Remote Base program 
- *  version 0.166 11/9/08 
+ *  version 0.167 11/12/08 
  * 
  * \author Jim Dixon, WB6NIL <jim at lambdatel.com>
  *
@@ -408,7 +408,7 @@
 /*! Stop the tones from playing */
 void ast_playtones_stop(struct ast_channel *chan);
 
-static  char *tdesc = "Radio Repeater / Remote Base  version 0.166  11/9/2008";
+static  char *tdesc = "Radio Repeater / Remote Base  version 0.167  11/12/2008";
 
 static char *app = "Rpt";
 
@@ -6778,17 +6778,14 @@
 				l->disced = 1;
 				l->hasconnected = 1;
 				rpt_mutex_unlock(&myrpt->lock);
+				memset(&wf,0,sizeof(wf));
 				wf.frametype = AST_FRAME_TEXT;
-				wf.subclass = 0;
-				wf.offset = 0;
-				wf.mallocd = 0;
 				wf.datalen = strlen(discstr) + 1;
-				wf.samples = 0;
 				wf.data = discstr;
 				wf.src = "function_ilink:1";
 				if (l->chan)
 				{
-					rpt_qwrite(l,&wf);
+					if (l->thisconnected) ast_write(l->chan,&wf);
 					if (ast_safe_sleep(l->chan,250) == -1) return DC_ERROR;
 					ast_softhangup(l->chan,AST_SOFTHANGUP_DEV);
 				}
@@ -6915,17 +6912,14 @@
                                 rpt_mutex_unlock(&myrpt->lock);
 				/* ast_log(LOG_NOTICE,"dumping link %s\n",l->name); */
                                 
+				memset(&wf,0,sizeof(wf));
                                 wf.frametype = AST_FRAME_TEXT;
-                                wf.subclass = 0;
-                                wf.offset = 0;
-                                wf.mallocd = 0;
                                 wf.datalen = strlen(discstr) + 1;
-                                wf.samples = 0;
                                 wf.data = discstr;
 				wf.src = "function_ilink:6";
                                 if (l->chan)
                                 {
-                                        rpt_qwrite(l,&wf);
+                                        if (l->thisconnected) ast_write(l->chan,&wf);
                                         ast_safe_sleep(l->chan,250); /* It's dead already, why check the return value? */
                                         ast_softhangup(l->chan,AST_SOFTHANGUP_DEV);
                                 }




More information about the asterisk-commits mailing list