[svn-commits] russell: branch group/newcdr r202747 - /team/group/newcdr/main/cel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 23 13:07:47 CDT 2009


Author: russell
Date: Tue Jun 23 13:07:44 2009
New Revision: 202747

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=202747
Log:
Remove unused vars, hold channel lock while filling in fields of temp chan

Modified:
    team/group/newcdr/main/cel.c

Modified: team/group/newcdr/main/cel.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/main/cel.c?view=diff&rev=202747&r1=202746&r2=202747
==============================================================================
--- team/group/newcdr/main/cel.c (original)
+++ team/group/newcdr/main/cel.c Tue Jun 23 13:07:44 2009
@@ -375,8 +375,6 @@
  */
 struct ast_channel *ast_cel_fabricate_channel_from_event(const struct ast_event *event)
 {
-	enum ast_cel_event_type event_type;
-	struct timeval eventtime;
 	struct varshead *headp;
 	struct ast_var_t *newvariable;
 	char timebuf[30];
@@ -423,6 +421,8 @@
 	if ((newvariable = ast_var_assign("eventextra", record.extra))) {
 		AST_LIST_INSERT_HEAD(headp, newvariable, entries);
 	}
+
+	ast_channel_lock(tchan);
 
 	tchan->cid.cid_name = ast_strdup(record.caller_id_name);
 	tchan->cid.cid_num = ast_strdup(record.caller_id_num);
@@ -444,6 +444,8 @@
 	tchan->appl = ast_strdup(record.application_name);
 	tchan->data = ast_strdup(record.application_data);
 	tchan->amaflags = record.amaflag;
+
+	ast_channel_unlock(tchan);
 
 	return tchan;
 }




More information about the svn-commits mailing list