From: erickson Date: Sun, 21 Aug 2005 20:11:28 +0000 (+0000) Subject: make install.sh slightly smarter X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=004e50cc0400d40a4288e935680251584452098f;p=opensrf%2Fbjwebb.git make install.sh slightly smarter removed compiler error for 'osrf_stack_process' by making it a global variable set by the stack (osrf_app_session no longer needs to know about the stack directly) git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@492 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/libstack/osrf_app_session.c b/src/libstack/osrf_app_session.c index 5ccbcf0..f9dee7a 100644 --- a/src/libstack/osrf_app_session.c +++ b/src/libstack/osrf_app_session.c @@ -634,7 +634,7 @@ int osrf_app_session_queue_wait( osrf_app_session* session, int timeout ){ if(session == NULL) return 0; int ret_val = 0; debug_handler( "AppSession in queue_wait with timeout %d", timeout ); - ret_val = osrf_stack_process(session->transport_handle, timeout); + ret_val = osrf_stack_entry_point(session->transport_handle, timeout); return ret_val; } diff --git a/src/libstack/osrf_app_session.h b/src/libstack/osrf_app_session.h index 5d4a91f..01b6dc5 100644 --- a/src/libstack/osrf_app_session.h +++ b/src/libstack/osrf_app_session.h @@ -17,6 +17,9 @@ enum OSRF_SESSION_STATE { OSRF_SESSION_CONNECTING, OSRF_SESSION_CONNECTED, OSRF_SESSION_DISCONNECTED }; enum OSRF_SESSION_TYPE { OSRF_SESSION_SERVER, OSRF_SESSION_CLIENT }; +/* entry point for data into the stack. gets set in osrf_stack.c */ +int (*osrf_stack_entry_point) (transport_client* client, int timeout ); + struct osrf_app_request_struct { /** Our controlling session */ struct osrf_app_session_struct* session; diff --git a/src/libstack/osrf_stack.c b/src/libstack/osrf_stack.c index 09f46d5..c11cfc6 100644 --- a/src/libstack/osrf_stack.c +++ b/src/libstack/osrf_stack.c @@ -3,6 +3,9 @@ osrf_message* _do_client( osrf_app_session*, osrf_message* ); 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) = &osrf_stack_process; + int osrf_stack_process( transport_client* client, int timeout ) { transport_message* msg = client_recv( client, timeout ); if(msg == NULL) return 0; diff --git a/src/libstack/osrf_stack.h b/src/libstack/osrf_stack.h index 805f0c7..aaac111 100644 --- a/src/libstack/osrf_stack.h +++ b/src/libstack/osrf_stack.h @@ -16,4 +16,5 @@ int osrf_stack_message_handler( osrf_app_session* session, osrf_message* msg ); int osrf_stack_application_handler( osrf_app_session* session, osrf_message* msg ); + #endif