[asterisk-commits] mmichelson: branch mmichelson/direct_media r382815 - in /team/mmichelson/dire...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 11 15:47:55 CDT 2013


Author: mmichelson
Date: Mon Mar 11 15:47:52 2013
New Revision: 382815

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382815
Log:
Rename callback types to have "ast_sip_session_" prefix


Modified:
    team/mmichelson/direct_media/include/asterisk/res_sip_session.h
    team/mmichelson/direct_media/res/res_sip_session.c

Modified: team/mmichelson/direct_media/include/asterisk/res_sip_session.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/direct_media/include/asterisk/res_sip_session.h?view=diff&rev=382815&r1=382814&r2=382815
==============================================================================
--- team/mmichelson/direct_media/include/asterisk/res_sip_session.h (original)
+++ team/mmichelson/direct_media/include/asterisk/res_sip_session.h Mon Mar 11 15:47:52 2013
@@ -96,13 +96,13 @@
 	pj_timer_entry rescheduled_reinvite;
 };
 
-typedef int (*request_creation_cb)(struct ast_sip_session *session, pjsip_tx_data *tdata);
-typedef int (*response_cb)(struct ast_sip_session *session, pjsip_rx_data *rdata);
+typedef int (*ast_sip_session_request_creation_cb)(struct ast_sip_session *session, pjsip_tx_data *tdata);
+typedef int (*ast_sip_session_response_cb)(struct ast_sip_session *session, pjsip_rx_data *rdata);
 
 struct ast_sip_session_delayed_request {
 	char method[15];
-	request_creation_cb on_request_creation;
-	response_cb on_response;
+	ast_sip_session_request_creation_cb on_request_creation;
+	ast_sip_session_response_cb on_response;
 	AST_LIST_ENTRY(ast_sip_session_delayed_request) next;
 };
 
@@ -384,7 +384,8 @@
  * \retval -1 Failure to send refresh
  */
 int ast_sip_session_refresh(struct ast_sip_session *session,
-		request_creation_cb on_request_creation, response_cb on_response,
+		ast_sip_session_request_creation_cb on_request_creation,
+		ast_sip_session_response_cb on_response,
 		enum ast_sip_session_refresh_method method);
 
 /*!
@@ -421,6 +422,6 @@
  * \param on_response Callback to be called when a response is received
  */
 void ast_sip_session_send_request_with_cb(struct ast_sip_session *session, pjsip_tx_data *tdata,
-		response_cb on_response);
+		ast_sip_session_response_cb on_response);
 
 #endif /* _RES_SIP_SESSION_H */

Modified: team/mmichelson/direct_media/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/direct_media/res/res_sip_session.c?view=diff&rev=382815&r1=382814&r2=382815
==============================================================================
--- team/mmichelson/direct_media/res/res_sip_session.c (original)
+++ team/mmichelson/direct_media/res/res_sip_session.c Mon Mar 11 15:47:52 2013
@@ -396,8 +396,8 @@
 	ast_sip_push_task(session->serializer, send_delayed_request, session);
 }
 
-static int delay_request(struct ast_sip_session *session, request_creation_cb on_request,
-		response_cb on_response, const char *method)
+static int delay_request(struct ast_sip_session *session, ast_sip_session_request_creation_cb on_request,
+		ast_sip_session_response_cb on_response, const char *method)
 {
 	struct ast_sip_session_delayed_request *delay = ast_calloc(1, sizeof(*delay));
 	if (!delay) {
@@ -411,7 +411,7 @@
 }
 
 int ast_sip_session_refresh(struct ast_sip_session *session,
-		request_creation_cb on_request_creation, response_cb on_response,
+		ast_sip_session_request_creation_cb on_request_creation, ast_sip_session_response_cb on_response,
 		enum ast_sip_session_refresh_method method)
 {
 	pjsip_inv_session *inv_session = session->inv_session;
@@ -481,7 +481,7 @@
 };
 
 void ast_sip_session_send_request_with_cb(struct ast_sip_session *session, pjsip_tx_data *tdata,
-		response_cb on_response)
+		ast_sip_session_response_cb on_response)
 {
 	pjsip_inv_session *inv_session = session->inv_session;
 
@@ -1001,10 +1001,10 @@
 
 struct reschedule_reinvite_data {
 	struct ast_sip_session *session;
-	response_cb on_response;
+	ast_sip_session_response_cb on_response;
 };
 
-static struct reschedule_reinvite_data *reschedule_reinvite_data_alloc(struct ast_sip_session *session, response_cb on_response)
+static struct reschedule_reinvite_data *reschedule_reinvite_data_alloc(struct ast_sip_session *session, ast_sip_session_response_cb on_response)
 {
 	struct reschedule_reinvite_data *rrd = ast_malloc(sizeof(*rrd));
 	if (!rrd) {
@@ -1026,7 +1026,7 @@
 {
 	struct reschedule_reinvite_data *rrd = data;
 	struct ast_sip_session *session = rrd->session;
-	response_cb on_response = rrd->on_response;
+	ast_sip_session_response_cb on_response = rrd->on_response;
 
 	ast_sip_session_refresh(session, NULL, on_response, AST_SIP_SESSION_REFRESH_METHOD_INVITE);
 	reschedule_reinvite_data_destroy(rrd);
@@ -1040,7 +1040,7 @@
 	ast_sip_push_task(rrd->session->serializer, really_resend_reinvite, entry->user_data);
 }
 
-static void reschedule_reinvite(struct ast_sip_session *session, response_cb on_response)
+static void reschedule_reinvite(struct ast_sip_session *session, ast_sip_session_response_cb on_response)
 {
 	pjsip_inv_session *inv = session->inv_session;
 	struct reschedule_reinvite_data *rrd = reschedule_reinvite_data_alloc(session, on_response);
@@ -1285,7 +1285,7 @@
 			}
 		}
 		if (tsx->mod_data[session_module.id]) {
-			response_cb cb = tsx->mod_data[session_module.id];
+			ast_sip_session_response_cb cb = tsx->mod_data[session_module.id];
 			cb(session, e->body.tsx_state.src.rdata);
 		}
 	case PJSIP_EVENT_TRANSPORT_ERROR:




More information about the asterisk-commits mailing list