This patch replaces some deprecated identifiers with their camelCase
equivalents.

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

Scott McKellar
http://home.swbell.net/mck9/ct/

Developer's Certificate of Origin 1.1 By making a contribution to
this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license indicated
in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source license
and I have the right under that license to submit that work with
modifications, whether created in whole or in part by me, under the
same open source license (unless I am permitted to submit under a
different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person
who certified (a), (b) or (c) and I have not modified it; and

(d) In the case of each of (a), (b), or (c), I understand and agree
that this project and the contribution are public and that a record
of the contribution (including all personal information I submit
with it, including my sign-off) is maintained indefinitely and may
be redistributed consistent with this project or the open source
license indicated in the file.
*** ./trunk/src/libopensrf/osrf_stack.c	2008-04-12 10:15:57.000000000 -0500
--- ./trunk-mod/src/libopensrf/osrf_stack.c	2008-04-13 21:11:20.000000000 -0500
***************
*** 6,17 ****
  // -----------------------------------------------------------------------------
  
  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* );
  
! /* tell osrf_app_session 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 ) {
--- 6,17 ----
  // -----------------------------------------------------------------------------
  
  static int osrf_stack_process( transport_client* client, int timeout, int* msg_received );
! 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 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,69 ****
  		return NULL;
  	}
  
! 	osrf_app_session* session = osrf_app_session_find_session( msg->thread );
  
  	if( !session && my_service ) 
  		session = osrf_app_server_session_init( msg->thread, my_service, msg->sender);
--- 63,69 ----
  		return NULL;
  	}
  
! 	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,83 ****
  		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];
  	memset(arr, 0, sizeof(arr));
  	int num_msgs = osrf_message_deserialize(msg->body, arr, OSRF_MAX_MSGS_PER_PACKET);
  
--- 77,83 ----
  		osrfLogDebug( OSRF_LOG_MARK, "Session [%s] found or built", session->session_id );
  
  	osrf_app_session_set_remote( session, msg->sender );
! 	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,131 ****
  	return session;
  }
  
! static int osrf_stack_message_handler( osrf_app_session* session, osrf_message* msg ) {
  	if(session == NULL || msg == NULL)
  		return 0;
  
! 	osrf_message* ret_msg = NULL;
  
  	if( session->type ==  OSRF_SESSION_CLIENT )
  		 ret_msg = _do_client( session, msg );
--- 121,131 ----
  	return session;
  }
  
! static int osrf_stack_message_handler( osrfAppSession* session, osrfMessage* msg ) {
  	if(session == NULL || msg == NULL)
  		return 0;
  
! 	osrfMessage* ret_msg = NULL;
  
  	if( session->type ==  OSRF_SESSION_CLIENT )
  		 ret_msg = _do_client( session, msg );
***************
*** 137,143 ****
  				msg->thread_trace, session->session_id );
  		osrf_stack_application_handler( session, ret_msg );
  	} else
! 		osrf_message_free(msg);
  
  	return 1;
  
--- 137,143 ----
  				msg->thread_trace, session->session_id );
  		osrf_stack_application_handler( session, ret_msg );
  	} else
! 		osrfMessageFree(msg);
  
  	return 1;
  
***************
*** 146,156 ****
  /** 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 ) {
  	if(session == NULL || msg == NULL)
  		return NULL;
  
! 	osrf_message* new_msg;
  
  	if( msg->m_type == STATUS ) {
  		
--- 146,156 ----
  /** If we return a message, that message should be passed up the stack, 
    * if we return NULL, we're finished for now...
    */
! static osrfMessage* _do_client( osrfAppSession* session, osrfMessage* msg ) {
  	if(session == NULL || msg == NULL)
  		return NULL;
  
! 	osrfMessage* new_msg;
  
  	if( msg->m_type == STATUS ) {
  		
***************
*** 197,203 ****
  						msg->status_code, msg->status_name );
  				new_msg->is_exception = 1;
  				osrf_app_session_set_complete( session, msg->thread_trace );
! 				osrf_message_free(msg);
  				return new_msg;
  		}
  
--- 197,203 ----
  						msg->status_code, msg->status_name );
  				new_msg->is_exception = 1;
  				osrf_app_session_set_complete( session, msg->thread_trace );
! 				osrfMessageFree(msg);
  				return new_msg;
  		}
  
***************
*** 214,220 ****
  /** 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 ) {
  
  	if(session == NULL || msg == NULL) return NULL;
  
--- 214,220 ----
  /** If we return a message, that message should be passed up the stack, 
    * if we return NULL, we're finished for now...
    */
! static osrfMessage* _do_server( osrfAppSession* session, osrfMessage* msg ) {
  
  	if(session == NULL || msg == NULL) return NULL;
  
***************
*** 253,259 ****
  
  
  
! static int osrf_stack_application_handler( osrf_app_session* session, osrf_message* msg ) {
  	if(session == NULL || msg == NULL) return 0;
  
  	if(msg->m_type == RESULT && session->type == OSRF_SESSION_CLIENT) {
--- 253,259 ----
  
  
  
! 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) {

Reply via email to