From dea9f0d738d4bb943b5a11ed7ca3d1f44cf6e832 Mon Sep 17 00:00:00 2001 From: scottmk Date: Mon, 22 Mar 2010 19:11:57 +0000 Subject: [PATCH 1/1] Tidying up white space; no substantive changes. M src/c-apps/osrf_math.c git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1939 9efc2488-bf62-4759-914b-345cdb29e865 --- src/c-apps/osrf_math.c | 57 +++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/src/c-apps/osrf_math.c b/src/c-apps/osrf_math.c index 0b57ade..2f38f71 100644 --- a/src/c-apps/osrf_math.c +++ b/src/c-apps/osrf_math.c @@ -13,30 +13,30 @@ int osrfMathRun( osrfMethodContext* ); 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, - "sub", - "osrfMathRun", + 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", "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 @@ int osrfAppChildInit() { /* 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 @@ int osrfMathRun( osrfMethodContext* ctx ) { 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 @@ int osrfMathRun( osrfMethodContext* ctx ) { 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 @@ int osrfMathRun( osrfMethodContext* ctx ) { 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 @@ int osrfMathRun( osrfMethodContext* ctx ) { osrfAppSessionFree(ses); } else { - if(a) free(a); - if(b) free(b); + if(a) + free(a); + if(b) + free(b); } } return -1; } - - - -- 2.43.2