[Opensrf-commits] r1514 - in trunk: include/opensrf src/libopensrf src/srfsh

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Nov 26 12:56:45 EST 2008


Author: erickson
Date: 2008-11-26 12:56:42 -0500 (Wed, 26 Nov 2008)
New Revision: 1514

Modified:
   trunk/include/opensrf/osrf_app_session.h
   trunk/src/libopensrf/osrf_app_session.c
   trunk/src/srfsh/srfsh.c
Log:
Two patches from Scott McKellar:

In some earlier patches I eliminated the old osrf_app_client_session_init
function in favor of its camel-case equivalent.  Unfortunately I didn't
notice that the new function now puts the old function's name into an
error message.  Here's the fix for that little oversight.

---

These patches replace a couple of deprecated identifiers with their
camel-case equivalents:
 
    osrf_message ==> osrfMessage
    string_array ==> osrfStringArray




Modified: trunk/include/opensrf/osrf_app_session.h
===================================================================
--- trunk/include/opensrf/osrf_app_session.h	2008-11-25 17:48:31 UTC (rev 1513)
+++ trunk/include/opensrf/osrf_app_session.h	2008-11-26 17:56:42 UTC (rev 1514)
@@ -31,9 +31,9 @@
 	/** True if we have received a 'request complete' message from our request */
 	int complete;
 	/** Our original request payload */
-	osrf_message* payload; 
+	osrfMessage* payload;
 	/** List of responses to our request */
-	osrf_message* result;
+	osrfMessage* result;
 
 	/* if set to true, then a call that is waiting on a response, will reset the 
 		timeout and set this variable back to false */
@@ -113,7 +113,7 @@
   */
 int osrfAppSessionMakeRequest(
 		osrfAppSession* session, const jsonObject* params,
-		const char* method_name, int protocol, string_array* param_strings);
+		const char* method_name, int protocol, osrfStringArray* param_strings);
 
 /** Sets the given request to complete state */
 void osrf_app_session_set_complete( osrfAppSession* session, int request_id );
@@ -122,7 +122,7 @@
 int osrf_app_session_request_complete( const osrfAppSession* session, int request_id );
 
 /** Does a recv call on the given request */
-osrf_message* osrfAppSessionRequestRecv(
+osrfMessage* osrfAppSessionRequestRecv(
 		osrfAppSession* session, int request_id, int timeout );
 
 /** Removes the request from the request set and frees the reqest */
@@ -140,7 +140,7 @@
 /** pushes the given message into the result list of the app_request
   * whose request_id matches the messages thread_trace 
   */
-int osrf_app_session_push_queue( osrfAppSession*, osrf_message* msg );
+int osrf_app_session_push_queue( osrfAppSession*, osrfMessage* msg );
 
 /** Attempts to connect to the remote service. Returns 1 on successful 
   * connection, 0 otherwise.

Modified: trunk/src/libopensrf/osrf_app_session.c
===================================================================
--- trunk/src/libopensrf/osrf_app_session.c	2008-11-25 17:48:31 UTC (rev 1513)
+++ trunk/src/libopensrf/osrf_app_session.c	2008-11-26 17:56:42 UTC (rev 1514)
@@ -220,7 +220,7 @@
 osrfAppSession* osrfAppSessionClientInit( const char* remote_service ) {
 
 	if (!remote_service) {
-		osrfLogWarning( OSRF_LOG_MARK, "No remote service specified in osrf_app_client_session_init");
+		osrfLogWarning( OSRF_LOG_MARK, "No remote service specified in osrfAppSessionClientInit");
 		return NULL;
 	}
 

Modified: trunk/src/srfsh/srfsh.c
===================================================================
--- trunk/src/srfsh/srfsh.c	2008-11-25 17:48:31 UTC (rev 1513)
+++ trunk/src/srfsh/srfsh.c	2008-11-26 17:56:42 UTC (rev 1514)
@@ -38,7 +38,7 @@
 static transport_client* client = NULL; 
 
 /* the last result we received */
-static osrf_message* last_result = NULL;
+static osrfMessage* last_result = NULL;
 
 /* functions */
 static int parse_request( char* request );
@@ -583,7 +583,7 @@
 	int req_id = osrfAppSessionMakeRequest( session, params, method, 1, NULL );
 	jsonObjectFree(params);
 
-	osrf_message* omsg = osrfAppSessionRequestRecv( session, req_id, recv_timeout );
+	osrfMessage* omsg = osrfAppSessionRequestRecv( session, req_id, recv_timeout );
 
 	if(!omsg) 
 		printf("\nReceived no data from server\n");
@@ -868,7 +868,7 @@
 
 			double start = get_timestamp_millis();
 			int req_id = osrfAppSessionMakeRequest( session, params, methods[j], 1, NULL );
-			osrf_message* omsg = osrfAppSessionRequestRecv( session, req_id, 5 );
+			osrfMessage* omsg = osrfAppSessionRequestRecv( session, req_id, 5 );
 			double end = get_timestamp_millis();
 
 			times[(4*i) + j] = end - start;



More information about the opensrf-commits mailing list