<max_spare_children>5</max_spare_children>
</unix_config>
<app_settings>
- <IDL>/openils/conf/fm_IDL.xml</IDL> <!-- deprecated with 1.1.0-->
+ <max_query_recursion>100</max_query_recursion>
<driver>pgsql</driver>
<database>
<type>master</type>
<max_spare_children>5</max_spare_children>
</unix_config>
<app_settings>
- <IDL>/openils/conf/fm_IDL.xml</IDL> <!-- deprecated with 1.1.0 -->
- <driver>pgsql</driver>
- <database>
- <type>master</type>
- <weight>2</weight>
- <user>postgres</user>
- <host>localhost</host>
- <port>5432</port>
- <pw>postgres</pw>
- <db>evergreen</db>
- <client_encoding>UTF-8</client_encoding>
- </database>
+ <driver>pgsql</driver>
+ <database>
+ <type>master</type>
+ <weight>2</weight>
+ <user>postgres</user>
+ <host>localhost</host>
+ <port>5432</port>
+ <pw>postgres</pw>
+ <db>evergreen</db>
+ <client_encoding>UTF-8</client_encoding>
+ </database>
</app_settings>
</open-ils.reporter-store>
dbi_conn dbhandle; /* our CURRENT db connection */
osrfHash readHandles;
jsonObject* jsonNULL = NULL; //
+static int max_flesh_depth = 100;
/* called when this process is about to exit */
void osrfAppChildExit() {
char* port = osrf_settings_host_value("/apps/%s/app_settings/database/port", MODULENAME);
char* db = osrf_settings_host_value("/apps/%s/app_settings/database/db", MODULENAME);
char* pw = osrf_settings_host_value("/apps/%s/app_settings/database/pw", MODULENAME);
+ char* md = osrf_settings_host_value("/apps/%s/app_settings/max_query_recursion", MODULENAME);
osrfLogDebug(OSRF_LOG_MARK, "Attempting to load the database driver [%s]...", driver);
writehandle = dbi_conn_new(driver);
if(pw) dbi_conn_set_option(writehandle, "password", pw );
if(db) dbi_conn_set_option(writehandle, "dbname", db );
+ if(md) max_flesh_depth = atoi(md);
+ if(max_flesh_depth < 0) max_flesh_depth = 1;
+ if(max_flesh_depth > 1000) max_flesh_depth = 1000;
+
free(user);
free(host);
free(port);
_tmp = jsonObjectGetKey( order_hash, "flesh" );
if (_tmp) {
int x = (int)jsonObjectGetNumber(_tmp);
+ if (x == -1 || x > max_flesh_depth) x = max_flesh_depth;
jsonObject* flesh_blob = NULL;
if ((flesh_blob = jsonObjectGetKey( order_hash, "flesh_fields" )) && x > 0) {