From: erickson Date: Wed, 7 Sep 2005 14:03:20 +0000 (+0000) Subject: changed initialize to osrfAppInitialize and childInit to osrfAppChildInit X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=672d45f16f228b5e8c8b54a5f3f8539daecacc8a;p=opensrf%2Fbjwebb.git changed initialize to osrfAppInitialize and childInit to osrfAppChildInit git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@532 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/c-apps/osrf_dbmath.c b/src/c-apps/osrf_dbmath.c index a792245..92ce665 100644 --- a/src/c-apps/osrf_dbmath.c +++ b/src/c-apps/osrf_dbmath.c @@ -2,12 +2,12 @@ #include "opensrf/osrf_application.h" #include "objson/object.h" -int initialize(); -int childInit(); +int osrfAppInitialize(); +int osrfAppChildInit(); int osrfMathRun( osrfMethodContext* ); -int initialize() { +int osrfAppInitialize() { osrfAppRegisterMethod( "opensrf.dbmath", "add", "osrfMathRun", "send 2 numbers and I'll add them", 2 ); osrfAppRegisterMethod( "opensrf.dbmath", "sub", "osrfMathRun", "send 2 numbers and I'll divide them", 2 ); osrfAppRegisterMethod( "opensrf.dbmath", "mult", "osrfMathRun", "send 2 numbers and I'll multiply them", 2 ); @@ -15,7 +15,7 @@ int initialize() { return 0; } -int childInit() { +int osrfAppChildInit() { return 0; } diff --git a/src/c-apps/osrf_math.c b/src/c-apps/osrf_math.c index c727c25..b074f17 100644 --- a/src/c-apps/osrf_math.c +++ b/src/c-apps/osrf_math.c @@ -2,12 +2,12 @@ #include "opensrf/osrf_application.h" #include "objson/object.h" -int initialize(); -int childInit(); +int osrfAppInitialize(); +int osrfAppChildInit(); int osrfMathRun( osrfMethodContext* ); -int initialize() { +int osrfAppInitialize() { /* tell the server about the methods we handle */ osrfAppRegisterMethod( "opensrf.math", "add", "osrfMathRun", "send 2 numbers and I'll add them", 2 ); @@ -17,7 +17,7 @@ int initialize() { return 0; } -int childInit() { +int osrfAppChildInit() { return 0; } diff --git a/src/libstack/osrf_application.c b/src/libstack/osrf_application.c index c3d7485..cb2c16e 100644 --- a/src/libstack/osrf_application.c +++ b/src/libstack/osrf_application.c @@ -29,10 +29,10 @@ int osrfAppRegisterApplication( char* appName, char* soFile ) { /* see if we can run the initialize method */ int (*init) (void); - *(void **) (&init) = dlsym(app->handle, "initialize"); + *(void **) (&init) = dlsym(app->handle, "osrfAppInitialize"); if( (error = dlerror()) != NULL ) { - warning_handler("! Unable to locate method symbol [initialize] for app %s: %s", appName, error ); + warning_handler("! Unable to locate method symbol [osrfAppInitialize] for app %s: %s", appName, error ); } else { @@ -40,7 +40,7 @@ int osrfAppRegisterApplication( char* appName, char* soFile ) { int ret; if( (ret = (*init)()) ) { warning_handler("Application %s returned non-zero value from " - "'initialize', not registering...", appName ); + "'osrfAppInitialize', not registering...", appName ); //free(app->name); /* need a method to remove an application from the list */ //free(app); return ret;