[asterisk-commits] qwell: branch qwell/fun_with_transports r384987 - /team/qwell/fun_with_transp...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 8 13:07:47 CDT 2013


Author: qwell
Date: Mon Apr  8 13:07:43 2013
New Revision: 384987

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384987
Log:
Fix naming to be a bit more sane.

Modified:
    team/qwell/fun_with_transports/res/res_sip_transport_websocket.c

Modified: team/qwell/fun_with_transports/res/res_sip_transport_websocket.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/fun_with_transports/res/res_sip_transport_websocket.c?view=diff&rev=384987&r1=384986&r2=384987
==============================================================================
--- team/qwell/fun_with_transports/res/res_sip_transport_websocket.c (original)
+++ team/qwell/fun_with_transports/res/res_sip_transport_websocket.c Mon Apr  8 13:07:43 2013
@@ -66,12 +66,12 @@
 	return PJ_SUCCESS;
 }
 
-static pj_status_t ws_shutdown(pjsip_transport *transport)
+static pj_status_t ws_do_shutdown(pjsip_transport *transport)
 {
 	return PJ_SUCCESS;
 }
 
-static pj_status_t ws_destroy_transport(pjsip_transport *transport)
+static pj_status_t ws_destroy(pjsip_transport *transport)
 {
 	struct ws_transport *wstransport = (struct ws_transport *)transport;
 
@@ -88,14 +88,14 @@
 	return PJ_SUCCESS;
 }
 
-static int ws_shutdown_transport(void *data)
+static int transport_shutdown(void *data)
 {
 	pjsip_transport *transport = data;
 	pjsip_transport_shutdown(transport);
 	return 0;
 }
 
-static int ws_create_transport(void *data)
+static int transport_create(void *data)
 {
 	struct ws_create_data *create_data = data;
 	struct ws_transport *newtransport;
@@ -132,8 +132,8 @@
 	newtransport->transport.endpt = endpt;
 	newtransport->transport.tpmgr = tpmgr;
 	newtransport->transport.send_msg = &ws_send_msg;
-	newtransport->transport.do_shutdown = &ws_shutdown;
-	newtransport->transport.destroy = &ws_destroy_transport;
+	newtransport->transport.do_shutdown = &ws_do_shutdown;
+	newtransport->transport.destroy = &ws_destroy;
 
 	pjsip_transport_register(newtransport->transport.tpmgr, (pjsip_transport *)newtransport);
 
@@ -141,7 +141,7 @@
 	return 0;
 }
 
-static int ws_read(void *data)
+static int transport_read(void *data)
 {
 	struct ws_read_data *read_data = data;
 	struct ws_transport *newtransport = read_data->transport;
@@ -201,21 +201,21 @@
 				struct ws_create_data create_data;
 				create_data.ws_session = session;
 
-				ast_sip_push_task_synchronous(serializer, ws_create_transport, &create_data);
+				ast_sip_push_task_synchronous(serializer, transport_create, &create_data);
 
 				transport = create_data.transport;
 			}
 
 			read_data.transport = transport;
 
-			ast_sip_push_task(serializer, ws_read, &read_data);
+			ast_sip_push_task(serializer, transport_read, &read_data);
 		} else if (opcode == AST_WEBSOCKET_OPCODE_CLOSE) {
 			break;
 		}
 	}
 
 	if (transport) {
-		ast_sip_push_task_synchronous(serializer, ws_shutdown_transport, transport);
+		ast_sip_push_task_synchronous(serializer, transport_shutdown, transport);
 	}
 
 	ast_taskprocessor_unreference(serializer);




More information about the asterisk-commits mailing list