void _osrf_app_request_push_queue( osrf_app_request* req, osrf_message* result ){
if(req == NULL || result == NULL) return;
osrfLogDebug( OSRF_LOG_MARK, "App Session pushing request [%d] onto request queue", result->thread_trace );
- if(req->result == NULL)
+ if(req->result == NULL) {
req->result = result;
- else {
+
+ } else {
+
+ osrf_message* ptr = req->result;
+ osrf_message* ptr2 = req->result->next;
+ while( ptr2 ) {
+ ptr = ptr2;
+ ptr2 = ptr2->next;
+ }
+ ptr->next = result;
+
+ /*
result->next = req->result;
req->result = result;
+ */
}
}
client->m_list->type = MESSAGE_LIST_HEAD;
client->session = init_transport( server, port, unix_path, client, component );
-
- if(client->session == NULL) {
- osrfLogError(OSRF_LOG_MARK, "client_init(): Out of Memory");
- return NULL;
- }
client->session->message_callback = client_message_handler;
return client;