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
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;
}
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;
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;
int osrf_stack_application_handler( osrf_app_session* session, osrf_message* msg );
+
#endif