]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res/res_sorcery_astdb: Add a debugging message for when retrieval by ID fails 52/852/3
authorMatt Jordan <mjordan@digium.com>
Wed, 8 Jul 2015 21:38:24 +0000 (16:38 -0500)
committerMatt Jordan <mjordan@digium.com>
Wed, 15 Jul 2015 00:15:14 +0000 (19:15 -0500)
Having a debug message tell us that we attempted to look up an item but
failed is nice in circumstances when it isn't clear if the wizard was
queried correctly or not.

Change-Id: I2600c3bbea87f252196358f62e73f4c7da8632f7

res/res_sorcery_astdb.c

index e282d8b688b6a56ed46ac9d2ff0c3c1572d82d35..45a54946a3768a1a102c13fc049989a94e1f9384 100644 (file)
@@ -202,6 +202,7 @@ static void *sorcery_astdb_retrieve_id(const struct ast_sorcery *sorcery, void *
        if (ast_db_get_allocated(family, id, &value) || !(json = ast_json_load_string(value, &error)) ||
                !(objset = sorcery_json_to_objectset(json)) || !(object = ast_sorcery_alloc(sorcery, type, id)) ||
                ast_sorcery_objectset_apply(sorcery, object, objset)) {
+               ast_debug(3, "Failed to retrieve object '%s' from astdb\n", id);
                ao2_cleanup(object);
                return NULL;
        }