[Opensrf-commits] r1939 - trunk/src/c-apps (scottmk)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Mar 22 15:12:01 EDT 2010


Author: scottmk
Date: 2010-03-22 15:11:57 -0400 (Mon, 22 Mar 2010)
New Revision: 1939

Modified:
   trunk/src/c-apps/osrf_math.c
Log:
Tidying up white space; no substantive changes.

M    src/c-apps/osrf_math.c


Modified: trunk/src/c-apps/osrf_math.c
===================================================================
--- trunk/src/c-apps/osrf_math.c	2010-03-18 18:35:56 UTC (rev 1938)
+++ trunk/src/c-apps/osrf_math.c	2010-03-22 19:11:57 UTC (rev 1939)
@@ -13,30 +13,30 @@
 
 int osrfAppInitialize() {
 
-	osrfAppRegisterMethod( 
-			MODULENAME,				/* which application has this method */
-			"add",					/* the name of the method */
-			"osrfMathRun",			/* the symbol that runs the method */
-			"Adds two numbers",	/* description of the method */
-			2,							/* the minimum number of params required to run the method */
-			0 );						/* method options, 0 for not special options */
+	osrfAppRegisterMethod(
+			MODULENAME,           /* which application has this method */
+			"add",                /* the name of the method */
+			"osrfMathRun",        /* the symbol that runs the method */
+			"Adds two numbers",   /* description of the method */
+			2,                    /* the minimum number of params required to run the method */
+			0 );                  /* method options, 0 for not special options */
 
-	osrfAppRegisterMethod( 
-			MODULENAME, 
-			"sub", 
-			"osrfMathRun", 
+	osrfAppRegisterMethod(
+			MODULENAME,
+			"sub",
+			"osrfMathRun",
 			"Subtracts two numbers", 2, 0 );
 
-	osrfAppRegisterMethod( 
-			MODULENAME, 
-			"mult", 
-			"osrfMathRun", 
+	osrfAppRegisterMethod(
+			MODULENAME,
+			"mult",
+			"osrfMathRun",
 			"Multiplies two numbers", 2, 0 );
 
-	osrfAppRegisterMethod( 
-			MODULENAME, 
-			"div", 
-			"osrfMathRun", 
+	osrfAppRegisterMethod(
+			MODULENAME,
+			"div",
+			"osrfMathRun",
 			"Divides two numbers", 2, 0 );
 
 	return 0;
@@ -49,7 +49,7 @@
 
 /* called when this process is about to exit */
 void osrfAppChildExit() {
-   osrfLogDebug(OSRF_LOG_MARK, "Child is exiting...");
+	osrfLogDebug(OSRF_LOG_MARK, "Child is exiting...");
 }
 
 
@@ -72,7 +72,7 @@
 
 		if( a && b ) {
 
-			osrfLogActivity( OSRF_LOG_MARK, "Running opensrf.math %s [ %s : %s ]", 
+			osrfLogActivity( OSRF_LOG_MARK, "Running opensrf.math %s [ %s : %s ]",
 					ctx->method->name, a, b );
 
 			/* construct a new params object to send to dbmath */
@@ -83,7 +83,7 @@
 			osrfAppSession* ses = osrfAppSessionClientInit("opensrf.dbmath");
 
 			/* forcing an explicit connect allows us to talk to one worker backend
-			 * regardless of "stateful" config settings for the server 
+			 * regardless of "stateful" config settings for the server
 			 * This buys us nothing here since we're only sending one request...
 			 * */
 			/*osrfAppSessionConnect(ses);*/
@@ -95,7 +95,7 @@
 
 			if(omsg) {
 				/* return dbmath's response to the user */
-				osrfAppRespondComplete( ctx, osrfMessageGetResult(omsg) ); 
+				osrfAppRespondComplete( ctx, osrfMessageGetResult(omsg) );
 				osrfMessageFree(omsg);
 				osrfAppSessionFree(ses);
 				return 0;
@@ -104,13 +104,12 @@
 			osrfAppSessionFree(ses);
 		}
 		else {
-			if(a) free(a);
-			if(b) free(b);
+			if(a)
+				free(a);
+			if(b)
+				free(b);
 		}
 	}
 
 	return -1;
 }
-
-
-



More information about the opensrf-commits mailing list