[open-ils-commits] r13807 - trunk/Open-ILS/src/c-apps (scottmk)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Aug 11 09:47:34 EDT 2009


Author: scottmk
Date: 2009-08-11 09:47:32 -0400 (Tue, 11 Aug 2009)
New Revision: 13807

Modified:
   trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
Segfaulting for json_queries selecting from functions, due to a
failure to handle the SELECT list properly.  Fixed.


Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c	2009-08-10 17:55:34 UTC (rev 13806)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c	2009-08-11 13:47:32 UTC (rev 13807)
@@ -2982,7 +2982,7 @@
 	jsonObject* defaultselhash = NULL;
 
 	// if there is no select list, build a default select list ...
-	if (!selhash) {
+	if (!selhash && !from_function) {
 		jsonObject* default_list = defaultSelectList( core_class );
 		if( ! default_list ) {
 			if (ctx) {
@@ -3003,7 +3003,7 @@
 	} 
 
 	// The SELECT clause can be encoded only by a hash
-	if( selhash->type != JSON_HASH ) {
+	if( !from_function && selhash->type != JSON_HASH ) {
 		osrfLogError(
 			OSRF_LOG_MARK,
 			"%s: Expected JSON_HASH for SELECT clause; found %s",



More information about the open-ils-commits mailing list