[open-ils-commits] r12037 - trunk/Open-ILS/src/c-apps
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Feb 1 16:26:40 EST 2009
Author: scottmk
Date: 2009-02-01 16:26:36 -0500 (Sun, 01 Feb 2009)
New Revision: 12037
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
Replaced all occurrences of the macro OSRF_METHOD_VERIFY_CONTEXT
with equivalent calls to the function osrfMethodVerifyContext().
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-02-01 21:25:46 UTC (rev 12036)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-02-01 21:26:36 UTC (rev 12037)
@@ -470,7 +470,10 @@
}
int beginTransaction ( osrfMethodContext* ctx ) {
- OSRF_METHOD_VERIFY_CONTEXT(ctx);
+ if(osrfMethodVerifyContext( ctx )) {
+ osrfLogError( OSRF_LOG_MARK, "Invalid method context" );
+ return -1;
+ }
#ifdef PCRUD
jsonObject* user = verifyUserPCRUD( ctx );
@@ -501,7 +504,10 @@
}
int setSavepoint ( osrfMethodContext* ctx ) {
- OSRF_METHOD_VERIFY_CONTEXT(ctx);
+ if(osrfMethodVerifyContext( ctx )) {
+ osrfLogError( OSRF_LOG_MARK, "Invalid method context" );
+ return -1;
+ }
int spNamePos = 0;
#ifdef PCRUD
@@ -546,9 +552,12 @@
}
int releaseSavepoint ( osrfMethodContext* ctx ) {
- OSRF_METHOD_VERIFY_CONTEXT(ctx);
+ if(osrfMethodVerifyContext( ctx )) {
+ osrfLogError( OSRF_LOG_MARK, "Invalid method context" );
+ return -1;
+ }
- int spNamePos = 0;
+ int spNamePos = 0;
#ifdef PCRUD
spNamePos = 1;
jsonObject* user = verifyUserPCRUD( ctx );
@@ -591,9 +600,12 @@
}
int rollbackSavepoint ( osrfMethodContext* ctx ) {
- OSRF_METHOD_VERIFY_CONTEXT(ctx);
+ if(osrfMethodVerifyContext( ctx )) {
+ osrfLogError( OSRF_LOG_MARK, "Invalid method context" );
+ return -1;
+ }
- int spNamePos = 0;
+ int spNamePos = 0;
#ifdef PCRUD
spNamePos = 1;
jsonObject* user = verifyUserPCRUD( ctx );
@@ -636,7 +648,10 @@
}
int commitTransaction ( osrfMethodContext* ctx ) {
- OSRF_METHOD_VERIFY_CONTEXT(ctx);
+ if(osrfMethodVerifyContext( ctx )) {
+ osrfLogError( OSRF_LOG_MARK, "Invalid method context" );
+ return -1;
+ }
#ifdef PCRUD
jsonObject* user = verifyUserPCRUD( ctx );
@@ -664,7 +679,10 @@
}
int rollbackTransaction ( osrfMethodContext* ctx ) {
- OSRF_METHOD_VERIFY_CONTEXT(ctx);
+ if(osrfMethodVerifyContext( ctx )) {
+ osrfLogError( OSRF_LOG_MARK, "Invalid method context" );
+ return -1;
+ }
#ifdef PCRUD
jsonObject* user = verifyUserPCRUD( ctx );
@@ -692,9 +710,12 @@
}
int dispatchCRUDMethod ( osrfMethodContext* ctx ) {
- OSRF_METHOD_VERIFY_CONTEXT(ctx);
+ if(osrfMethodVerifyContext( ctx )) {
+ osrfLogError( OSRF_LOG_MARK, "Invalid method context" );
+ return -1;
+ }
- osrfHash* meta = (osrfHash*) ctx->method->userData;
+ osrfHash* meta = (osrfHash*) ctx->method->userData;
osrfHash* class_obj = osrfHashGet( meta, "class" );
int err = 0;
@@ -3064,7 +3085,11 @@
}
int doJSONSearch ( osrfMethodContext* ctx ) {
- OSRF_METHOD_VERIFY_CONTEXT(ctx);
+ if(osrfMethodVerifyContext( ctx )) {
+ osrfLogError( OSRF_LOG_MARK, "Invalid method context" );
+ return -1;
+ }
+
osrfLogDebug(OSRF_LOG_MARK, "Recieved query request");
int err = 0;
More information about the open-ils-commits
mailing list