From 625f7438c0e79b89126afb40aced2d8ba2946f2f Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 2 Mar 2005 17:16:16 +0000 Subject: [PATCH] now requests are finished and sessions are destroyed git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@152 9efc2488-bf62-4759-914b-345cdb29e865 --- src/srfsh/srfsh.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/srfsh/srfsh.c b/src/srfsh/srfsh.c index 6dfd7a3..211ad4e 100644 --- a/src/srfsh/srfsh.c +++ b/src/srfsh/srfsh.c @@ -204,31 +204,35 @@ int send_request( char* server, char* method, growing_buffer* buffer ) { osrf_message* omsg = osrf_app_session_request_recv( session, req_id, 8 ); if(!omsg) - printf("Received no data from server\n"); + printf("\nReceived no data from server\n"); while(omsg) { if(omsg->result_content) { char* content = json_printer( omsg->result_content ); - printf( "Received Data: %s\n",content ); + printf( "\nReceived Data: %s\n",content ); free(content); } else - printf( "Received Message but no result data\n"); + printf( "\nReceived Message but no result data\n"); osrf_message_free(omsg); omsg = osrf_app_session_request_recv( session, req_id, 5 ); } + double end = get_timestamp_millis(); + printf("\n------------------------------------\n"); if( osrf_app_session_request_complete( session, req_id )) - printf("[Request Completed Successfully]\n"); + printf("Request Completed Successfully\n"); - double end = get_timestamp_millis(); printf("Request Time in seconds: %f\n", end - start ); + printf("------------------------------------\n"); + osrf_app_session_request_finish( session, req_id ); osrf_app_session_disconnect( session ); + osrf_app_session_destroy( session ); return 1; -- 2.11.0