[svn-commits] oej: trunk r55323 - /trunk/res/res_features.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Feb 18 08:01:08 MST 2007


Author: oej
Date: Sun Feb 18 09:01:07 2007
New Revision: 55323

URL: http://svn.digium.com/view/asterisk?view=rev&rev=55323
Log:
Simplify post_manager_event()

Modified:
    trunk/res/res_features.c

Modified: trunk/res/res_features.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_features.c?view=diff&rev=55323&r1=55322&r2=55323
==============================================================================
--- trunk/res/res_features.c (original)
+++ trunk/res/res_features.c Sun Feb 18 09:01:07 2007
@@ -1508,17 +1508,18 @@
 	return res;
 }
 
-static void post_manager_event(const char *s, char *parkingexten, struct ast_channel *chan)
+/*! \brief Output parking event to manager */
+static void post_manager_event(const char *s, struct parkeduser *pu)
 {
 	manager_event(EVENT_FLAG_CALL, s,
 		"Exten: %s\r\n"
 		"Channel: %s\r\n"
 		"CallerIDNum: %s\r\n"
 		"CallerIDName: %s\r\n\r\n",
-		parkingexten, 
-		chan->name,
-		S_OR(chan->cid.cid_num, "<unknown>"),
-		S_OR(chan->cid.cid_name, "<unknown>")
+		pu->parkingexten, 
+		pu->chan->name,
+		S_OR(pu->chan->cid.cid_num, "<unknown>"),
+		S_OR(pu->chan->cid.cid_name, "<unknown>")
 		);
 }
 
@@ -1588,7 +1589,7 @@
 					set_c_e_p(chan, pu->context, pu->exten, pu->priority);
 				}
 
-				post_manager_event("ParkedCallTimeOut", pu->parkingexten, chan);
+				post_manager_event("ParkedCallTimeOut", pu);
 
 				if (option_verbose > 1) 
 					ast_verbose(VERBOSE_PREFIX_2 "Timeout for %s parked on %d. Returning to %s,%s,%d\n", chan->name, pu->parkingnum, chan->context, chan->exten, chan->priority);
@@ -1631,7 +1632,7 @@
 					if (!f || (f->frametype == AST_FRAME_CONTROL && f->subclass ==  AST_CONTROL_HANGUP)) {
 						if (f)
 							ast_frfree(f);
-						post_manager_event("ParkedCallGiveUp", pu->parkingexten, chan);
+						post_manager_event("ParkedCallGiveUp", pu);
 
 						/* There's a problem, hang them up*/
 						if (option_verbose > 1) 



More information about the svn-commits mailing list