[asterisk-commits] mmichelson: branch group/CCSS r231183 - /team/group/CCSS/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 24 17:27:08 CST 2009


Author: mmichelson
Date: Tue Nov 24 17:27:06 2009
New Revision: 231183

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=231183
Log:
Make EPA callbacks optional and remove the cc_handle_ok callback
since it wasn't going to do anything.


Modified:
    team/group/CCSS/channels/chan_sip.c

Modified: team/group/CCSS/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_sip.c?view=diff&rev=231183&r1=231182&r2=231183
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Tue Nov 24 17:27:06 2009
@@ -1777,7 +1777,6 @@
 static const struct epa_static_data cc_epa_static_data  = {
 	.event = CALL_COMPLETION,
 	.name = "call-completion",
-	.handle_ok = cc_handle_ok,
 	.handle_error = cc_handle_error,
 };
 
@@ -18923,15 +18922,6 @@
 	}
 }
 
-static void cc_handle_ok(struct sip_pvt *pvt, struct sip_request *req, struct sip_epa_entry *epa_entry)
-{
-	/* XXX STUB 
-	 *
-	 * Really, this function doesn't need to do anything. The CC core calls its suspend callback
-	 * and does not await any sort of response from the monitor. It is assumed that all went well.
-	 */
-}
-
 static void cc_handle_error(struct sip_pvt *pvt, const int resp, struct sip_request *req, struct sip_epa_entry *epa_entry)
 {
 	/* XXX STUB
@@ -18984,13 +18974,17 @@
 		 * Each EPA will have a specific action to take as a result of this
 		 * development, so ... callbacks!
 		 */
-		epa_entry->static_data->handle_ok(p, req, epa_entry);
+		if (epa_entry->static_data->handle_ok) {
+			epa_entry->static_data->handle_ok(p, req, epa_entry);
+		}
 	} else {
 		/* Rather than try to make individual callbacks for each error
 		 * type, there is just a single error callback. The callback
 		 * can distinguish between error messages and do what it needs to
 		 */
-		epa_entry->static_data->handle_error(p, resp, req, epa_entry);
+		if (epa_entry->static_data->handle_error) {
+			epa_entry->static_data->handle_error(p, resp, req, epa_entry);
+		}
 	}
 }
 




More information about the asterisk-commits mailing list