[asterisk-commits] oej: branch group/set-tonezone-trunk r286345 - in /team/group/set-tonezone-tr...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Sep 11 13:18:29 CDT 2010


Author: oej
Date: Sat Sep 11 13:18:22 2010
New Revision: 286345

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=286345
Log:
Reset automerge

Modified:
    team/group/set-tonezone-trunk/   (props changed)
    team/group/set-tonezone-trunk/channels/chan_sip.c
    team/group/set-tonezone-trunk/main/app.c
    team/group/set-tonezone-trunk/main/features.c
    team/group/set-tonezone-trunk/main/file.c
    team/group/set-tonezone-trunk/main/say.c

Propchange: team/group/set-tonezone-trunk/
------------------------------------------------------------------------------
    automerge = http://www.codename-pineapple.org/

Propchange: team/group/set-tonezone-trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Propchange: team/group/set-tonezone-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Sep 11 13:18:22 2010
@@ -1,1 +1,1 @@
-/trunk:1-286196
+/trunk:1-286342

Modified: team/group/set-tonezone-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/set-tonezone-trunk/channels/chan_sip.c?view=diff&rev=286345&r1=286344&r2=286345
==============================================================================
--- team/group/set-tonezone-trunk/channels/chan_sip.c (original)
+++ team/group/set-tonezone-trunk/channels/chan_sip.c Sat Sep 11 13:18:22 2010
@@ -6523,8 +6523,9 @@
 	ast_debug(3, "*** Joint capabilities are %s \n", ast_getformatname_multiple(buf, SIPBUFSIZE, i->jointcapability));
 	ast_debug(3, "*** Our capabilities are %s \n", ast_getformatname_multiple(buf, SIPBUFSIZE, i->capability));
 	ast_debug(3, "*** AST_CODEC_CHOOSE formats are %s \n", ast_getformatname_multiple(buf, SIPBUFSIZE, ast_codec_choose(&i->prefs, what, 1)));
-	if (i->prefcodec)
+	if (i->prefcodec) {
 		ast_debug(3, "*** Our preferred formats from the incoming channel are %s \n", ast_getformatname_multiple(buf, SIPBUFSIZE, i->prefcodec));
+	}
 
 	/* XXX Why are we choosing a codec from the native formats?? */
 	fmt = ast_best_codec(tmp->nativeformats);
@@ -6549,10 +6550,11 @@
 			needtext = i->jointcapability & AST_FORMAT_TEXT_MASK;	/* Inbound call */
 	}
 
-	if (needvideo)
+	if (needvideo) {
 		ast_debug(3, "This channel can handle video! HOLLYWOOD next!\n");
-	else
+	} else {
 		ast_debug(3, "This channel will not be able to handle video.\n");
+	}
 
 	enable_dsp_detect(i);
 
@@ -6576,13 +6578,16 @@
 		ast_channel_set_fd(tmp, 2, ast_rtp_instance_fd(i->vrtp, 0));
 		ast_channel_set_fd(tmp, 3, ast_rtp_instance_fd(i->vrtp, 1));
 	}
-	if (needtext && i->trtp)
+	if (needtext && i->trtp) {
 		ast_channel_set_fd(tmp, 4, ast_rtp_instance_fd(i->trtp, 0));
-	if (i->udptl)
+	}
+	if (i->udptl) {
 		ast_channel_set_fd(tmp, 5, ast_udptl_fd(i->udptl));
-
-	if (state == AST_STATE_RING)
+	}
+
+	if (state == AST_STATE_RING) {
 		tmp->rings = 1;
+	}
 	tmp->adsicpe = AST_ADSI_UNAVAILABLE;
 
 	tmp->writeformat = fmt;
@@ -6599,14 +6604,18 @@
 	tmp->pickupgroup = i->pickupgroup;
 	tmp->caller.id.name.presentation = i->callingpres;
 	tmp->caller.id.number.presentation = i->callingpres;
-	if (!ast_strlen_zero(i->parkinglot))
+	if (!ast_strlen_zero(i->parkinglot)) {
 		ast_string_field_set(tmp, parkinglot, i->parkinglot);
-	if (!ast_strlen_zero(i->accountcode))
+	}
+	if (!ast_strlen_zero(i->accountcode)) {
 		ast_string_field_set(tmp, accountcode, i->accountcode);
-	if (i->amaflags)
+	}
+	if (i->amaflags) {
 		tmp->amaflags = i->amaflags;
-	if (!ast_strlen_zero(i->language))
+	}
+	if (!ast_strlen_zero(i->language)) {
 		ast_string_field_set(tmp, language, i->language);
+	}
 	tmp->zone = i->zone;
 	i->owner = tmp;
 	ast_module_ref(ast_module_info->self);
@@ -6635,14 +6644,18 @@
 	}
 
 	tmp->priority = 1;
-	if (!ast_strlen_zero(i->uri))
+	if (!ast_strlen_zero(i->uri)) {
 		pbx_builtin_setvar_helper(tmp, "SIPURI", i->uri);
-	if (!ast_strlen_zero(i->domain))
+	}
+	if (!ast_strlen_zero(i->domain)) {
 		pbx_builtin_setvar_helper(tmp, "SIPDOMAIN", i->domain);
-	if (!ast_strlen_zero(i->callid))
+	}
+	if (!ast_strlen_zero(i->callid)) {
 		pbx_builtin_setvar_helper(tmp, "SIPCALLID", i->callid);
-	if (i->rtp)
+	}
+	if (i->rtp) {
 		ast_jb_configure(tmp, &global_jbconf);
+	}
 
 	/* Set channel variables for this call from configuration */
 	for (v = i->chanvars ; v ; v = v->next) {
@@ -6657,14 +6670,16 @@
 		tmp = NULL;
 	}
 
-	if (i->do_history)
+	if (i->do_history) {
 		append_history(i, "NewChan", "Channel %s - from %s", tmp->name, i->callid);
+	}
 
 	/* Inform manager user about new channel and their SIP call ID */
-	if (sip_cfg.callevents)
+	if (sip_cfg.callevents) {
 		manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate",
 			"Channel: %s\r\nUniqueid: %s\r\nChanneltype: %s\r\nSIPcallid: %s\r\nSIPfullcontact: %s\r\n",
 			tmp->name, tmp->uniqueid, "SIP", i->callid, i->fullcontact);
+	}
 
 	return tmp;
 }
@@ -6672,8 +6687,9 @@
 /*! \brief Reads one line of SIP message body */
 static char *get_body_by_line(const char *line, const char *name, int nameLen, char delimiter)
 {
-	if (!strncasecmp(line, name, nameLen) && line[nameLen] == delimiter)
+	if (!strncasecmp(line, name, nameLen) && line[nameLen] == delimiter) {
 		return ast_skip_blanks(line + nameLen + 1);
+	}
 
 	return "";
 }
@@ -6733,8 +6749,9 @@
 
 	for (x = 0; x < req->lines; x++) {
 		r = get_body_by_line(REQ_OFFSET_TO_STR(req, line[x]), name, len, delimiter);
-		if (r[0] != '\0')
+		if (r[0] != '\0') {
 			return r;
+		}
 	}
 
 	return "";
@@ -6798,8 +6815,9 @@
 			const char *header = REQ_OFFSET_TO_STR(req, header[x]);
 			if (!strncasecmp(header, name, len)) {
 				const char *r = header + len;	/* skip name */
-				if (sip_cfg.pedanticsipchecking)
+				if (sip_cfg.pedanticsipchecking) {
 					r = ast_skip_blanks(r);
+				}
 
 				if (*r == ':') {
 					*start = x+1;
@@ -6807,8 +6825,9 @@
 				}
 			}
 		}
-		if (pass == 0) /* Try aliases */
+		if (pass == 0) { /* Try aliases */
 			name = find_alias(name, NULL);
+		}
 	}
 
 	/* Don't return NULL, so get_header is always a valid pointer */
@@ -6853,11 +6872,13 @@
 		if (sipdebug_text) {
 			int i;
 			unsigned char* arr = f->data.ptr;
-			for (i=0; i < f->datalen; i++)
+			for (i=0; i < f->datalen; i++) {
 				ast_verbose("%c", (arr[i] > ' ' && arr[i] < '}') ? arr[i] : '.');
+			}
 			ast_verbose(" -> ");
-			for (i=0; i < f->datalen; i++)
+			for (i=0; i < f->datalen; i++) {
 				ast_verbose("%02X ", arr[i]);
+			}
 			ast_verbose("\n");
 		}
 		break;
@@ -6875,8 +6896,9 @@
 	}
 
 	/* We already hold the channel lock */
-	if (!p->owner || (f && f->frametype != AST_FRAME_VOICE))
+	if (!p->owner || (f && f->frametype != AST_FRAME_VOICE)) {
 		return f;
+	}
 
 	if (f && f->subclass.codec != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
 		if (!(f->subclass.codec & p->jointcapability)) {

Modified: team/group/set-tonezone-trunk/main/app.c
URL: http://svnview.digium.com/svn/asterisk/team/group/set-tonezone-trunk/main/app.c?view=diff&rev=286345&r1=286344&r2=286345
==============================================================================
--- team/group/set-tonezone-trunk/main/app.c (original)
+++ team/group/set-tonezone-trunk/main/app.c Sat Sep 11 13:18:22 2010
@@ -914,8 +914,9 @@
 			totalsilence += dspsilence;
 		}
 
-        	if (totalsilence > 0)
+		if (totalsilence > 0) {
 			*duration -= (totalsilence - 200) / 1000;
+		}
 		if (*duration < 0) {
 			*duration = 0;
 		}
@@ -929,7 +930,7 @@
 			 * to trim ANY part of the recording.
 			 */
 			if (res > 0 && dspsilence) {
-                                /* rewind only the trailing silence */
+				/* rewind only the trailing silence */
 				ast_stream_rewind(others[x], dspsilence - 200);
 			}
 			ast_truncstream(others[x]);

Modified: team/group/set-tonezone-trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/group/set-tonezone-trunk/main/features.c?view=diff&rev=286345&r1=286344&r2=286345
==============================================================================
--- team/group/set-tonezone-trunk/main/features.c (original)
+++ team/group/set-tonezone-trunk/main/features.c Sat Sep 11 13:18:22 2010
@@ -783,14 +783,14 @@
 		 * limitation here.  If extout was not numeric, we could permit
 		 * arbitrary non-numeric extensions.
 		 */
-        if (sscanf(parkingexten, "%30d", &parking_space) != 1 || parking_space < 0) {
+	if (sscanf(parkingexten, "%30d", &parking_space) != 1 || parking_space < 0) {
 			AST_LIST_UNLOCK(&parkinglot->parkings);
 			parkinglot_unref(parkinglot);
-            free(pu);
-            ast_log(LOG_WARNING, "PARKINGEXTEN does not indicate a valid parking slot: '%s'.\n", parkingexten);
-            return NULL;
-        }
-        snprintf(pu->parkingexten, sizeof(pu->parkingexten), "%d", parking_space);
+	    free(pu);
+	    ast_log(LOG_WARNING, "PARKINGEXTEN does not indicate a valid parking slot: '%s'.\n", parkingexten);
+	    return NULL;
+	}
+	snprintf(pu->parkingexten, sizeof(pu->parkingexten), "%d", parking_space);
 
 		if (ast_exists_extension(NULL, parkinglot->parking_con, pu->parkingexten, 1, NULL)) {
 			ast_log(LOG_WARNING, "Requested parking extension already exists: %s@%s\n", parkingexten, parkinglot->parking_con);
@@ -1097,7 +1097,7 @@
 {
 	struct ast_channel *test_channel1;
 	if (!(test_channel1 = ast_channel_alloc(0, AST_STATE_DOWN, NULL, NULL, NULL,
-        NULL, NULL, 0, 0, "TestChannel1"))) {
+	NULL, NULL, 0, 0, "TestChannel1"))) {
 		return NULL;
 	}
 
@@ -2880,17 +2880,17 @@
 {
        ast_log(LOG_NOTICE, "______ %s (%lx)______\n", title, (unsigned long)chan);
        ast_log(LOG_NOTICE, "CHAN: name: %s;  appl: %s; data: %s; contxt: %s;  exten: %s; pri: %d;\n",
-                       chan->name, chan->appl, chan->data, chan->context, chan->exten, chan->priority);
+		       chan->name, chan->appl, chan->data, chan->context, chan->exten, chan->priority);
        ast_log(LOG_NOTICE, "CHAN: acctcode: %s;  dialcontext: %s; amaflags: %x; maccontxt: %s;  macexten: %s; macpri: %d;\n",
-                       chan->accountcode, chan->dialcontext, chan->amaflags, chan->macrocontext, chan->macroexten, chan->macropriority);
+		       chan->accountcode, chan->dialcontext, chan->amaflags, chan->macrocontext, chan->macroexten, chan->macropriority);
        ast_log(LOG_NOTICE, "CHAN: masq: %p;  masqr: %p; _bridge: %p; uniqueID: %s; linkedID:%s\n",
-                       chan->masq, chan->masqr,
-                       chan->_bridge, chan->uniqueid, chan->linkedid);
+		       chan->masq, chan->masqr,
+		       chan->_bridge, chan->uniqueid, chan->linkedid);
        if (chan->masqr)
-               ast_log(LOG_NOTICE, "CHAN: masquerading as: %s;  cdr: %p;\n",
-                               chan->masqr->name, chan->masqr->cdr);
+	       ast_log(LOG_NOTICE, "CHAN: masquerading as: %s;  cdr: %p;\n",
+		               chan->masqr->name, chan->masqr->cdr);
        if (chan->_bridge)
-               ast_log(LOG_NOTICE, "CHAN: Bridged to %s\n", chan->_bridge->name);
+	       ast_log(LOG_NOTICE, "CHAN: Bridged to %s\n", chan->_bridge->name);
 
 	ast_log(LOG_NOTICE, "===== done ====\n");
 }
@@ -4239,38 +4239,42 @@
 		} else if (!strcasecmp(confvar->name, "findslot")) {
 			parkinglot->parkfindnext = (!strcasecmp(confvar->value, "next"));
 		} else if (!strcasecmp(confvar->name, "parkedcalltransfers")) {
-                        ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value);
-                        if (!strcasecmp(confvar->value, "both"))
-                                parkinglot->parkedcalltransfers = AST_FEATURE_FLAG_BYBOTH;
-                        else if (!strcasecmp(confvar->value, "caller"))
-                                parkinglot->parkedcalltransfers = AST_FEATURE_FLAG_BYCALLER;
-                        else if (!strcasecmp(confvar->value, "callee"))
-                                parkinglot->parkedcalltransfers = AST_FEATURE_FLAG_BYCALLEE;
-                } else if (!strcasecmp(confvar->name, "parkedcallreparking")) {
-                        ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value);
-                        if (!strcasecmp(confvar->value, "both"))
-                                parkinglot->parkedcallreparking = AST_FEATURE_FLAG_BYBOTH;
-                        else if (!strcasecmp(confvar->value, "caller"))
-                                parkinglot->parkedcallreparking = AST_FEATURE_FLAG_BYCALLER;
-                        else if (!strcasecmp(confvar->value, "callee"))
-                                parkinglot->parkedcallreparking = AST_FEATURE_FLAG_BYCALLEE;
-                } else if (!strcasecmp(confvar->name, "parkedcallhangup")) {
-                        ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value);
-                        if (!strcasecmp(confvar->value, "both"))
-                                parkinglot->parkedcallhangup = AST_FEATURE_FLAG_BYBOTH;
-                        else if (!strcasecmp(confvar->value, "caller"))
-                                parkinglot->parkedcallhangup = AST_FEATURE_FLAG_BYCALLER;
-                        else if (!strcasecmp(confvar->value, "callee"))
-                                parkinglot->parkedcallhangup = AST_FEATURE_FLAG_BYCALLEE;
-                } else if (!strcasecmp(confvar->name, "parkedcallrecording")) {
-                        ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value);
-                        if (!strcasecmp(confvar->value, "both"))
-                                parkinglot->parkedcallrecording = AST_FEATURE_FLAG_BYBOTH;
-                        else if (!strcasecmp(confvar->value, "caller"))
-                                parkinglot->parkedcallrecording = AST_FEATURE_FLAG_BYCALLER;
-                        else if (!strcasecmp(confvar->value, "callee"))
-                                parkinglot->parkedcallrecording = AST_FEATURE_FLAG_BYCALLEE;
-                }
+			ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value);
+			if (!strcasecmp(confvar->value, "both")) {
+				parkinglot->parkedcalltransfers = AST_FEATURE_FLAG_BYBOTH;
+			} else if (!strcasecmp(confvar->value, "caller")) {
+				parkinglot->parkedcalltransfers = AST_FEATURE_FLAG_BYCALLER;
+		        } else if (!strcasecmp(confvar->value, "callee")) {
+				parkinglot->parkedcalltransfers = AST_FEATURE_FLAG_BYCALLEE;
+			}
+		} else if (!strcasecmp(confvar->name, "parkedcallreparking")) {
+			ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value);
+			if (!strcasecmp(confvar->value, "both")) {
+				parkinglot->parkedcallreparking = AST_FEATURE_FLAG_BYBOTH;
+			} else if (!strcasecmp(confvar->value, "caller")) {
+				parkinglot->parkedcallreparking = AST_FEATURE_FLAG_BYCALLER;
+			} else if (!strcasecmp(confvar->value, "callee")) {
+				parkinglot->parkedcallreparking = AST_FEATURE_FLAG_BYCALLEE;
+			}
+		} else if (!strcasecmp(confvar->name, "parkedcallhangup")) {
+			ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value);
+			if (!strcasecmp(confvar->value, "both")) {
+				parkinglot->parkedcallhangup = AST_FEATURE_FLAG_BYBOTH;
+			} else if (!strcasecmp(confvar->value, "caller")) {
+				parkinglot->parkedcallhangup = AST_FEATURE_FLAG_BYCALLER; 
+			} else if (!strcasecmp(confvar->value, "callee")) {
+				parkinglot->parkedcallhangup = AST_FEATURE_FLAG_BYCALLEE;
+			}
+		} else if (!strcasecmp(confvar->name, "parkedcallrecording")) {
+			ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value);
+			if (!strcasecmp(confvar->value, "both")) {
+				parkinglot->parkedcallrecording = AST_FEATURE_FLAG_BYBOTH;
+			} else if (!strcasecmp(confvar->value, "caller")) {
+				parkinglot->parkedcallrecording = AST_FEATURE_FLAG_BYCALLER;
+			} else if (!strcasecmp(confvar->value, "callee")) {
+				parkinglot->parkedcallrecording = AST_FEATURE_FLAG_BYCALLEE;
+			}
+		}
 		confvar = confvar->next;
 	}
 	/* make sure parkingtime is set if not specified */

Modified: team/group/set-tonezone-trunk/main/file.c
URL: http://svnview.digium.com/svn/asterisk/team/group/set-tonezone-trunk/main/file.c?view=diff&rev=286345&r1=286344&r2=286345
==============================================================================
--- team/group/set-tonezone-trunk/main/file.c (original)
+++ team/group/set-tonezone-trunk/main/file.c Sat Sep 11 13:18:22 2010
@@ -653,7 +653,10 @@
 	chan->oldwriteformat = chan->writeformat;
 	/* Set the channel to a format we can work with */
 	res = ast_set_write_format(chan, fmts);
- 	res = ast_filehelper(buf, chan, NULL, ACTION_OPEN);
+	if (res == -1) {	/* No format available that works with this channel */
+		return NULL;
+	}
+	res = ast_filehelper(buf, chan, NULL, ACTION_OPEN);
 	if (res >= 0)
 		return chan->stream;
 	return NULL;

Modified: team/group/set-tonezone-trunk/main/say.c
URL: http://svnview.digium.com/svn/asterisk/team/group/set-tonezone-trunk/main/say.c?view=diff&rev=286345&r1=286344&r2=286345
==============================================================================
--- team/group/set-tonezone-trunk/main/say.c (original)
+++ team/group/set-tonezone-trunk/main/say.c Sat Sep 11 13:18:22 2010
@@ -3725,7 +3725,7 @@
 			case 'Y':
 				/* Year */
 				if (tm.tm_year > 99) {
-				        res = ast_say_number(chan, tm.tm_year + 1900, ints, lang, (char *) NULL);
+					res = ast_say_number(chan, tm.tm_year + 1900, ints, lang, (char *) NULL);
 				} else if (tm.tm_year < 1) {
 					/* I'm not going to handle 1900 and prior */
 					/* We'll just be silent on the year, instead of bombing out. */
@@ -4559,13 +4559,13 @@
 				break;
 			case 'd':
 			case 'e': /* Day of the month */
-                                /* I'm not sure exactly what the parameters 
-                                 * audiofd and ctrlfd to 
-                                 * ast_say_number_full_he mean, but it seems
-                                 * safe to pass -1 there. 
-                                 *
-                                 * At least in one of the pathes :-( 
-                                 */
+				/* I'm not sure exactly what the parameters 
+ 				* audiofd and ctrlfd to 
+ 				* ast_say_number_full_he mean, but it seems
+ 				* safe to pass -1 there. 
+ 				*
+ 				* At least in one of the pathes :-( 
+ 				*/
 				res = ast_say_number_full_he(chan, tm.tm_mday, ints, lang, "m", -1, -1);
 				break;
 			case 'Y': /* Year */
@@ -5225,7 +5225,7 @@
 				break;
 			case 'R':
 				res = ast_say_date_with_format_it(chan, t, ints, lang, "HM", tzone);
-	        	break;
+				break;
 			case 'S':
 				/* Seconds */
 				if (tm.tm_sec == 0) {
@@ -5254,7 +5254,7 @@
 						}
 					}
 				}
-		        break;
+				break;
 			case 'T':
 				res = ast_say_date_with_format_it(chan, t, ints, lang, "HMS", tzone);
 				break;
@@ -7703,7 +7703,7 @@
 			case 'Y':
 				/* Year */
 				if (tm.tm_year > 99) {
-				        res = ast_say_number(chan, tm.tm_year + 1900, ints, lang, (char *) NULL);
+					res = ast_say_number(chan, tm.tm_year + 1900, ints, lang, (char *) NULL);
 				} else if (tm.tm_year < 1) {
 					/* I'm not going to handle 1900 and prior */
 					/* We'll just be silent on the year, instead of bombing out. */
@@ -8263,7 +8263,7 @@
  */
 static const char *counted_noun_ending_slavic(int num)
 {
-    	if (num < 0) {
+	if (num < 0) {
 	    num *= -1;
 	}
 	num %= 100;			/* never pay attention to more than two digits */




More information about the asterisk-commits mailing list