[asterisk-commits] oej: branch oej/moremanager r259188 - in /team/oej/moremanager: ./ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 27 03:34:03 CDT 2010


Author: oej
Date: Tue Apr 27 03:33:59 2010
New Revision: 259188

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=259188
Log:
Resolve conflict, reset automerge

Modified:
    team/oej/moremanager/   (props changed)
    team/oej/moremanager/main/channel.c
    team/oej/moremanager/main/loader.c

Propchange: team/oej/moremanager/
------------------------------------------------------------------------------
    automerge = http://www.codename-pineapple.org/

Propchange: team/oej/moremanager/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Apr 27 03:33:59 2010
@@ -1,1 +1,1 @@
-/branches/1.4:1-258810
+/branches/1.4:1-259187

Modified: team/oej/moremanager/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/main/channel.c?view=diff&rev=259188&r1=259187&r2=259188
==============================================================================
--- team/oej/moremanager/main/channel.c (original)
+++ team/oej/moremanager/main/channel.c Tue Apr 27 03:33:59 2010
@@ -715,6 +715,7 @@
 	int flags;
 	struct varshead *headp;
 	va_list ap1, ap2;
+	char *tech = "";
 
 	/* If shutting down, don't allocate any new channels */
 	if (shutting_down) {
@@ -815,6 +816,7 @@
 	tmp->cid.cid_num = ast_strdup(cid_num);
 	
 	if (!ast_strlen_zero(name_fmt)) {
+		char *slash;
 		/* Almost every channel is calling this function, and setting the name via the ast_string_field_build() call.
 		 * And they all use slightly different formats for their name string.
 		 * This means, to set the name here, we have to accept variable args, and call the string_field_build from here.
@@ -827,12 +829,65 @@
 		ast_string_field_build_va(tmp, name, name_fmt, ap1, ap2);
 		va_end(ap1);
 		va_end(ap2);
-
-		/* and now, since the channel structure is built, and has its name, let's call the
-		 * manager event generator with this Newchannel event. This is the proper and correct
-		 * place to make this call, but you sure do have to pass a lot of data into this func
-		 * to do it here!
-		 */
+		tech = ast_strdupa(tmp->name);
+		if ((slash = strchr(tech, '/'))) {
+			*slash = '\0';
+		}
+	}
+
+	/* Reminder for the future: under what conditions do we NOT want to track cdrs on channels? */
+
+	/* These 4 variables need to be set up for the cdr_init() to work right */
+	if (amaflag)
+		tmp->amaflags = amaflag;
+	else
+		tmp->amaflags = ast_default_amaflags;
+	
+	if (!ast_strlen_zero(acctcode))
+		ast_string_field_set(tmp, accountcode, acctcode);
+	else
+		ast_string_field_set(tmp, accountcode, ast_default_accountcode);
+		
+	if (!ast_strlen_zero(context))
+		ast_copy_string(tmp->context, context, sizeof(tmp->context));
+	else
+		strcpy(tmp->context, "default");
+
+	if (!ast_strlen_zero(exten))
+		ast_copy_string(tmp->exten, exten, sizeof(tmp->exten));
+	else
+		strcpy(tmp->exten, "s");
+
+	tmp->priority = 1;
+		
+	tmp->cdr = ast_cdr_alloc();
+	ast_cdr_init(tmp->cdr, tmp);
+	ast_cdr_start(tmp->cdr);
+	
+	headp = &tmp->varshead;
+	AST_LIST_HEAD_INIT_NOLOCK(headp);
+	
+	ast_mutex_init(&tmp->lock);
+	
+	AST_LIST_HEAD_INIT_NOLOCK(&tmp->datastores);
+	
+	ast_string_field_set(tmp, language, defaultlanguage);
+
+	tmp->tech = &null_tech;
+
+	ast_set_flag(tmp, AST_FLAG_IN_CHANNEL_LIST);
+
+	AST_LIST_LOCK(&channels);
+	AST_LIST_INSERT_HEAD(&channels, tmp, chan_list);
+	AST_LIST_UNLOCK(&channels);
+
+	/*\!note
+	 * and now, since the channel structure is built, and has its name, let's
+	 * call the manager event generator with this Newchannel event. This is the
+	 * proper and correct place to make this call, but you sure do have to pass
+	 * a lot of data into this func to do it here!
+	 */
+	if (ast_get_channel_tech(tech)) {
 		manager_event(EVENT_FLAG_CALL, "Newchannel",
 			      "Channel: %s\r\n"
 			      "ChannelState: %d\r\n"
@@ -852,71 +907,6 @@
 			      S_OR(exten, ""),
 			      tmp->accountcode,
 			      tmp->uniqueid);
-	}
-
-	/* Reminder for the future: under what conditions do we NOT want to track cdrs on channels? */
-
-	/* These 4 variables need to be set up for the cdr_init() to work right */
-	if (amaflag)
-		tmp->amaflags = amaflag;
-	else
-		tmp->amaflags = ast_default_amaflags;
-	
-	if (!ast_strlen_zero(acctcode))
-		ast_string_field_set(tmp, accountcode, acctcode);
-	else
-		ast_string_field_set(tmp, accountcode, ast_default_accountcode);
-		
-	if (!ast_strlen_zero(context))
-		ast_copy_string(tmp->context, context, sizeof(tmp->context));
-	else
-		strcpy(tmp->context, "default");
-
-	if (!ast_strlen_zero(exten))
-		ast_copy_string(tmp->exten, exten, sizeof(tmp->exten));
-	else
-		strcpy(tmp->exten, "s");
-
-	tmp->priority = 1;
-		
-	tmp->cdr = ast_cdr_alloc();
-	ast_cdr_init(tmp->cdr, tmp);
-	ast_cdr_start(tmp->cdr);
-	
-	headp = &tmp->varshead;
-	AST_LIST_HEAD_INIT_NOLOCK(headp);
-	
-	ast_mutex_init(&tmp->lock);
-	
-	AST_LIST_HEAD_INIT_NOLOCK(&tmp->datastores);
-	
-	ast_string_field_set(tmp, language, defaultlanguage);
-
-	tmp->tech = &null_tech;
-
-	ast_set_flag(tmp, AST_FLAG_IN_CHANNEL_LIST);
-
-	AST_LIST_LOCK(&channels);
-	AST_LIST_INSERT_HEAD(&channels, tmp, chan_list);
-	AST_LIST_UNLOCK(&channels);
-
-	/*\!note
-	 * and now, since the channel structure is built, and has its name, let's
-	 * call the manager event generator with this Newchannel event. This is the
-	 * proper and correct place to make this call, but you sure do have to pass
-	 * a lot of data into this func to do it here!
-	 */
-	if (!ast_strlen_zero(name_fmt)) {
-		manager_event(EVENT_FLAG_CALL, "Newchannel",
-		      "Channel: %s\r\n"
-		      "State: %s\r\n"
-		      "CallerIDNum: %s\r\n"
-		      "CallerIDName: %s\r\n"
-		      "Uniqueid: %s\r\n",
-		      tmp->name, ast_state2str(state),
-		      S_OR(cid_num, "<unknown>"),
-		      S_OR(cid_name, "<unknown>"),
-		      tmp->uniqueid);
 	}
 
 	return tmp;

Modified: team/oej/moremanager/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/main/loader.c?view=diff&rev=259188&r1=259187&r2=259188
==============================================================================
--- team/oej/moremanager/main/loader.c (original)
+++ team/oej/moremanager/main/loader.c Tue Apr 27 03:33:59 2010
@@ -1045,8 +1045,6 @@
 	}
 	AST_LIST_TRAVERSE_SAFE_END;
 
-=======
->>>>>>> .merge-right.r233782
 done:
 	while ((order = AST_LIST_REMOVE_HEAD(&load_order, entry))) {
 		free(order->resource);




More information about the asterisk-commits mailing list