[Opensrf-commits] r1325 - trunk/src/libopensrf

svn at svn.open-ils.org svn at svn.open-ils.org
Fri May 16 09:17:18 EDT 2008


Author: erickson
Date: 2008-05-16 09:17:17 -0400 (Fri, 16 May 2008)
New Revision: 1325

Modified:
   trunk/src/libopensrf/osrf_stack.c
Log:
Patch from Scott McKellar:

This patch replaces some deprecated identifiers with their camelCase
equivalents.

osrf_app_session  ==> osrfAppSession
osrf_message      ==> osrfMessage
osrf_message_free ==> osrfMessageFree



Modified: trunk/src/libopensrf/osrf_stack.c
===================================================================
--- trunk/src/libopensrf/osrf_stack.c	2008-05-16 12:59:23 UTC (rev 1324)
+++ trunk/src/libopensrf/osrf_stack.c	2008-05-16 13:17:17 UTC (rev 1325)
@@ -6,12 +6,12 @@
 // -----------------------------------------------------------------------------
 
 static int osrf_stack_process( transport_client* client, int timeout, int* msg_received );
-static int osrf_stack_message_handler( osrf_app_session* session, osrf_message* msg );
-static int osrf_stack_application_handler( osrf_app_session* session, osrf_message* msg );
-static osrf_message* _do_client( osrf_app_session*, osrf_message* );
-static osrf_message* _do_server( osrf_app_session*, osrf_message* );
+static int osrf_stack_message_handler( osrfAppSession* session, osrfMessage* msg );
+static int osrf_stack_application_handler( osrfAppSession* session, osrfMessage* msg );
+static osrfMessage* _do_client( osrfAppSession*, osrfMessage* );
+static osrfMessage* _do_server( osrfAppSession*, osrfMessage* );
 
-/* tell osrf_app_session where the stack entry is */
+/* tell osrfAppSession where the stack entry is */
 int (*osrf_stack_entry_point) (transport_client*, int, int*)  = &osrf_stack_process;
 
 static int osrf_stack_process( transport_client* client, int timeout, int* msg_received ) {
@@ -63,7 +63,7 @@
 		return NULL;
 	}
 
-	osrf_app_session* session = osrf_app_session_find_session( msg->thread );
+	osrfAppSession* session = osrf_app_session_find_session( msg->thread );
 
 	if( !session && my_service ) 
 		session = osrf_app_server_session_init( msg->thread, my_service, msg->sender);
@@ -77,7 +77,7 @@
 		osrfLogDebug( OSRF_LOG_MARK, "Session [%s] found or built", session->session_id );
 
 	osrf_app_session_set_remote( session, msg->sender );
-	osrf_message* arr[OSRF_MAX_MSGS_PER_PACKET];
+	osrfMessage* arr[OSRF_MAX_MSGS_PER_PACKET];
 	memset(arr, 0, sizeof(arr));
 	int num_msgs = osrf_message_deserialize(msg->body, arr, OSRF_MAX_MSGS_PER_PACKET);
 
@@ -121,11 +121,11 @@
 	return session;
 }
 
-static int osrf_stack_message_handler( osrf_app_session* session, osrf_message* msg ) {
+static int osrf_stack_message_handler( osrfAppSession* session, osrfMessage* msg ) {
 	if(session == NULL || msg == NULL)
 		return 0;
 
-	osrf_message* ret_msg = NULL;
+	osrfMessage* ret_msg = NULL;
 
 	if( session->type ==  OSRF_SESSION_CLIENT )
 		 ret_msg = _do_client( session, msg );
@@ -137,7 +137,7 @@
 				msg->thread_trace, session->session_id );
 		osrf_stack_application_handler( session, ret_msg );
 	} else
-		osrf_message_free(msg);
+		osrfMessageFree(msg);
 
 	return 1;
 
@@ -146,11 +146,11 @@
 /** If we return a message, that message should be passed up the stack, 
   * if we return NULL, we're finished for now...
   */
-static osrf_message* _do_client( osrf_app_session* session, osrf_message* msg ) {
+static osrfMessage* _do_client( osrfAppSession* session, osrfMessage* msg ) {
 	if(session == NULL || msg == NULL)
 		return NULL;
 
-	osrf_message* new_msg;
+	osrfMessage* new_msg;
 
 	if( msg->m_type == STATUS ) {
 		
@@ -197,7 +197,7 @@
 						msg->status_code, msg->status_name );
 				new_msg->is_exception = 1;
 				osrf_app_session_set_complete( session, msg->thread_trace );
-				osrf_message_free(msg);
+				osrfMessageFree(msg);
 				return new_msg;
 		}
 
@@ -214,7 +214,7 @@
 /** If we return a message, that message should be passed up the stack, 
   * if we return NULL, we're finished for now...
   */
-static osrf_message* _do_server( osrf_app_session* session, osrf_message* msg ) {
+static osrfMessage* _do_server( osrfAppSession* session, osrfMessage* msg ) {
 
 	if(session == NULL || msg == NULL) return NULL;
 
@@ -253,7 +253,7 @@
 
 
 
-static int osrf_stack_application_handler( osrf_app_session* session, osrf_message* msg ) {
+static int osrf_stack_application_handler( osrfAppSession* session, osrfMessage* msg ) {
 	if(session == NULL || msg == NULL) return 0;
 
 	if(msg->m_type == RESULT && session->type == OSRF_SESSION_CLIENT) {



More information about the opensrf-commits mailing list