[asterisk-commits] pcadach: branch pcadach/chan_h323-live r41273 - in /team/pcadach/chan_h323-li...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Aug 29 10:25:39 MST 2006


Author: pcadach
Date: Tue Aug 29 12:25:38 2006
New Revision: 41273

URL: http://svn.digium.com/view/asterisk?rev=41273&view=rev
Log:
Merged revisions 41267-41268,41270-41272 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r41267 | murf | 2006-08-29 18:24:01 +0600 (Втр, 29 Авг 2006) | 1 line

Bugfix for 7813 applied to trunk as per patch supplied by stevens
................
r41268 | murf | 2006-08-29 19:21:47 +0600 (Втр, 29 Авг 2006) | 3 lines

Committed a fix for 7731, suggested by mnehauser.


................
r41270 | russell | 2006-08-29 19:40:04 +0600 (Втр, 29 Авг 2006) | 11 lines

Merged revisions 41269 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r41269 | russell | 2006-08-29 09:33:34 -0400 (Tue, 29 Aug 2006) | 3 lines

clean up last commit ... most notably, there is no reason to do heap
allocations here, and it also included a potential memory leak

........

................
r41271 | russell | 2006-08-29 19:48:15 +0600 (Втр, 29 Авг 2006) | 2 lines

suppress compiler warning

................
r41272 | russell | 2006-08-29 19:55:54 +0600 (Втр, 29 Авг 2006) | 2 lines

update to reflect recent rtp changes

................

Modified:
    team/pcadach/chan_h323-live/   (props changed)
    team/pcadach/chan_h323-live/apps/app_macro.c
    team/pcadach/chan_h323-live/channels/chan_jingle.c
    team/pcadach/chan_h323-live/pbx/pbx_config.c
    team/pcadach/chan_h323-live/utils/smsq.c

Propchange: team/pcadach/chan_h323-live/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/pcadach/chan_h323-live/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Aug 29 12:25:38 2006
@@ -1,1 +1,1 @@
-/trunk:1-41255
+/trunk:1-41272

Modified: team/pcadach/chan_h323-live/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/apps/app_macro.c?rev=41273&r1=41272&r2=41273&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/apps/app_macro.c (original)
+++ team/pcadach/chan_h323-live/apps/app_macro.c Tue Aug 29 12:25:38 2006
@@ -257,7 +257,7 @@
 			break;
 		}
 		/* don't stop executing extensions when we're in "h" */
-		if (chan->_softhangup && strcasecmp(chan->macroexten,"h")) {
+		if (chan->_softhangup && strcasecmp(oldexten,"h") && strcasecmp(chan->macroexten,"h")) {
 			ast_log(LOG_DEBUG, "Extension %s, macroexten %s, priority %d returned normally even though call was hung up\n",
 				chan->exten, chan->macroexten, chan->priority);
 			goto out;

Modified: team/pcadach/chan_h323-live/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/chan_jingle.c?rev=41273&r1=41272&r2=41273&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/chan_jingle.c (original)
+++ team/pcadach/chan_h323-live/channels/chan_jingle.c Tue Aug 29 12:25:38 2006
@@ -185,7 +185,7 @@
 /*----- RTP interface functions */
 static int jingle_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp,
 							   struct ast_rtp *vrtp, int codecs, int nat_active);
-static struct ast_rtp *jingle_get_rtp_peer(struct ast_channel *chan);
+static enum ast_rtp_get_result jingle_get_rtp_peer(struct ast_channel *chan, struct ast_rtp **rtp);
 static int jingle_get_codec(struct ast_channel *chan);
 
 /*! \brief PBX interface structure for channel registration */
@@ -405,18 +405,22 @@
 	return res;
 }
 
-static struct ast_rtp *jingle_get_rtp_peer(struct ast_channel *chan)
+static enum ast_rtp_get_result jingle_get_rtp_peer(struct ast_channel *chan, struct ast_rtp **rtp)
 {
 	struct jingle_pvt *p = chan->tech_pvt;
-	struct ast_rtp *rtp = NULL;
+	enum ast_rtp_get_result res = AST_RTP_GET_FAILED;
 
 	if (!p)
-		return NULL;
+		return res;
+
 	ast_mutex_lock(&p->lock);
-	if (p->rtp)
-		rtp = p->rtp;
+	if (p->rtp) {
+		*rtp = p->rtp;
+		res = AST_RTP_TRY_NATIVE;
+	}
 	ast_mutex_unlock(&p->lock);
-	return rtp;
+
+	return res;
 }
 
 static int jingle_get_codec(struct ast_channel *chan)

Modified: team/pcadach/chan_h323-live/pbx/pbx_config.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/pbx/pbx_config.c?rev=41273&r1=41272&r2=41273&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/pbx/pbx_config.c (original)
+++ team/pcadach/chan_h323-live/pbx/pbx_config.c Tue Aug 29 12:25:38 2006
@@ -782,9 +782,12 @@
 	}
 
 	/* fireout general info */
-	fprintf(output, "[general]\nstatic=%s\nwriteprotect=%s\n\n",
+	fprintf(output, "[general]\nstatic=%s\nwriteprotect=%s\nautofallthrough=%s\nclearglobalvars=%s\npriorityjumping=%s\n\n",
 		static_config ? "yes" : "no",
-		write_protect_config ? "yes" : "no");
+		write_protect_config ? "yes" : "no",
+                autofallthrough_config ? "yes" : "no",
+                clearglobalvars_config ? "yes" : "no",
+		ast_true(ast_variable_retrieve(cfg, "general", "priorityjumping")) ? "yes" : "no");
 
 	if ((v = ast_variable_browse(cfg, "globals"))) {
 		fprintf(output, "[globals]\n");
@@ -848,27 +851,31 @@
 						    ast_get_extension_app(p));
 				} else { /* copy and replace '|' with ',' */
 					const char *sep, *cid;
-					char *tempdata = strdup(ast_get_extension_app_data(p));
+					char *tempdata;
 					char *s;
-
-					if (!tempdata) { /* XXX error duplicating string ? */
-						incomplete = 1;
-						continue;
-					}
-					for (s = tempdata; *s; s++)
+					const char *el = ast_get_extension_label(p);
+					char label[128];
+ 
+ 					tempdata = ast_strdupa(ast_get_extension_app_data(p));
+
+					for (s = tempdata; *s; s++) {
 						if (*s == '|')
 							*s = ',';
+					}
+
 					if (ast_get_extension_matchcid(p)) {
 						sep = "/";
 						cid = ast_get_extension_cidmatch(p);
-					} else {
+					} else
 						sep = cid = "";
-					}
-					fprintf(output, "exten => %s%s%s,%d,%s(%s)\n",
+				
+					if (el && (snprintf(label, 127, "(%s)", el) != (strlen(el) + 2)))
+						incomplete = 1;	/* error encountered or label > 125 chars */
+					
+					fprintf(output, "exten => %s%s%s,%d%s,%s(%s)\n",
 					    ast_get_extension_name(p), sep, cid,
-					    ast_get_extension_priority(p),
+					    ast_get_extension_priority(p), label,
 					    ast_get_extension_app(p), tempdata);
-					free(tempdata);
 				}
 			}
 		}

Modified: team/pcadach/chan_h323-live/utils/smsq.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/utils/smsq.c?rev=41273&r1=41272&r2=41273&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/utils/smsq.c (original)
+++ team/pcadach/chan_h323-live/utils/smsq.c Tue Aug 29 12:25:38 2006
@@ -192,6 +192,7 @@
 static void rxqcheck (char *dir, char *queue, char *process)
 {
    char *p;
+   void *pp = &p;
    char dirname[100],
      temp[100];
    DIR *d;
@@ -267,7 +268,7 @@
                {                /* read the user data as UTF-8 */
                   long v;
                   udl = 0;
-                  while ((v = utf8decode ((unsigned char **) &p)) && udl < 160)
+                  while ((v = utf8decode (pp)) && udl < 160)
                      if (v && v <= 0xFFFF)
                         ud[udl++] = v;
                }



More information about the asterisk-commits mailing list