+
+ /* fallback to a case insensitive search */
+ i = json_object_array_length(afdb->applications.pubarr);
+ while (i) {
+ result = json_object_array_get_idx(afdb->applications.pubarr, --i);
+ if (result
+ && json_object_object_get_ex(result, "id", &result)
+ && !strcasecmp(id, json_object_get_string(result))) {
+ if (json_object_object_get_ex( afdb->applications.direct,
+ json_object_get_string(result),
+ &result))
+ return json_object_get(result);
+ else
+ return NULL;
+ }
+ }