osrfLogDebug( OSRF_LOG_MARK, "Object not found in the database with primary key %s of %s", pkey, pkey_value );
jsonObjectFree(_tmp_params);
jsonObjectFree(_list);
+
+ growing_buffer* msg = buffer_init(128);
+ buffer_fadd(
+ msg,
+ "%s: no object found with primary key %s of %s",
+ MODULENAME,
+ pkey,
+ pkey_value
+ );
+
+ char* m = buffer_release(msg);
+ osrfAppSessionStatus( ctx->session, OSRF_STATUS_BADREQUEST, "osrfMethodException", ctx->request, m );
+
+ free(m);
+ free(pkey_value);
+
return 0;
}
+ free(pkey_value);
jsonObjectFree(_tmp_params);
jsonObjectFree(_list);
osrfStringArray* map = osrfNewStringArray(0);
string_tmp = NULL;
- if( (string_tmp = (char*)xmlGetProp(_l, BAD_CAST "permission") )) {
+ if( (string_tmp = (char*)xmlGetProp(_a, BAD_CAST "permission") )) {
char* map_list = strdup( string_tmp );
osrfLogDebug(OSRF_LOG_MARK, "Permacrud permission list is %s", string_tmp );
}
osrfHashSet( _tmp, map, "permission");
- osrfHashSet( _tmp, (char*)xmlGetProp(_l, BAD_CAST "global_required"), "global_required");
+ osrfHashSet( _tmp, (char*)xmlGetProp(_a, BAD_CAST "global_required"), "global_required");
map = osrfNewStringArray(0);
string_tmp = NULL;
- if( (string_tmp = (char*)xmlGetProp(_l, BAD_CAST "context_field") )) {
+ if( (string_tmp = (char*)xmlGetProp(_a, BAD_CAST "context_field") )) {
char* map_list = strdup( string_tmp );
osrfLogDebug(OSRF_LOG_MARK, "Permacrud context_field list is %s", string_tmp );
osrfHash* foreign_context = osrfNewHash();
osrfHashSet( _tmp, foreign_context, "foreign_context");
- xmlNodePtr _f = _l->children;
+ xmlNodePtr _f = _a->children;
while(_f) {
if ( strcmp( (char*)_f->name, "context" ) ) {