int beginTransaction ( osrfMethodContext* ctx ) {
OSRF_METHOD_VERIFY_CONTEXT(ctx);
-#ifdef PRCRUD
+#ifdef PCRUD
jsonObject* user = verifyUserPCRUD( ctx );
- if (!user) {
- jsonObjectFree(user);
- return -1;
- }
+ if (!user) return -1;
jsonObjectFree(user);
#endif
OSRF_METHOD_VERIFY_CONTEXT(ctx);
int spNamePos = 0;
-#ifdef PRCRUD
+#ifdef PCRUD
spNamePos = 1;
jsonObject* user = verifyUserPCRUD( ctx );
- if (!user) {
- jsonObjectFree(user);
- return -1;
- }
+ if (!user) return -1;
jsonObjectFree(user);
#endif
OSRF_METHOD_VERIFY_CONTEXT(ctx);
int spNamePos = 0;
-#ifdef PRCRUD
+#ifdef PCRUD
spNamePos = 1;
jsonObject* user = verifyUserPCRUD( ctx );
- if (!user) {
- jsonObjectFree(user);
- return -1;
- }
+ if (!user) return -1;
jsonObjectFree(user);
#endif
OSRF_METHOD_VERIFY_CONTEXT(ctx);
int spNamePos = 0;
-#ifdef PRCRUD
+#ifdef PCRUD
spNamePos = 1;
jsonObject* user = verifyUserPCRUD( ctx );
- if (!user) {
- jsonObjectFree(user);
- return -1;
- }
+ if (!user) return -1;
jsonObjectFree(user);
#endif
int commitTransaction ( osrfMethodContext* ctx ) {
OSRF_METHOD_VERIFY_CONTEXT(ctx);
-#ifdef PRCRUD
+#ifdef PCRUD
jsonObject* user = verifyUserPCRUD( ctx );
- if (!user) {
- jsonObjectFree(user);
- return -1;
- }
+ if (!user) return -1;
jsonObjectFree(user);
#endif
int rollbackTransaction ( osrfMethodContext* ctx ) {
OSRF_METHOD_VERIFY_CONTEXT(ctx);
-#ifdef PRCRUD
+#ifdef PCRUD
jsonObject* user = verifyUserPCRUD( ctx );
- if (!user) {
- jsonObjectFree(user);
- return -1;
- }
+ if (!user) return -1;
jsonObjectFree(user);
#endif
osrfAppSessionStatus( ctx->session, OSRF_STATUS_BADREQUEST, "osrfMethodException", ctx->request, m );
free(m);
- free(auth);
-
- return jsonNULL;
+ jsonObjectFree(user);
+ user = jsonNULL;
}
+ free(auth);
return user;
}