summaryrefslogtreecommitdiff
path: root/res/res_sorcery_astdb.c
diff options
context:
space:
mode:
authorAlexei Gradinari <alex2grad@gmail.com>2016-04-15 10:32:12 -0400
committerJoshua Colp <jcolp@digium.com>2016-05-05 10:45:49 -0500
commitcc4c5f5693101b3c63ba083044729f24c3924685 (patch)
treebebec3263b06e339a3ef63f49875fb2fde64b9be /res/res_sorcery_astdb.c
parent380ac201acf29efb2a69a4ef668a8d7da387f47b (diff)
res_pjsip: improve realtime performance
This patch modified pjsip_options to retrieve only permament contacts for aor if the qualify_frequency is > 0 and persisted contacts if the qualify_frequency is > 0. This patch also fixed a bug in res_sorcery_astdb. res_sorcery_astdb doesn't save object data retrived from astdb. ASTERISK-25826 Change-Id: I1831fa46c4578eae5a3e574ee3362fddf08a1f05
Diffstat (limited to 'res/res_sorcery_astdb.c')
-rw-r--r--res/res_sorcery_astdb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/res/res_sorcery_astdb.c b/res/res_sorcery_astdb.c
index b3642d81e..dcfaba528 100644
--- a/res/res_sorcery_astdb.c
+++ b/res/res_sorcery_astdb.c
@@ -97,7 +97,6 @@ static void *sorcery_astdb_retrieve_fields_common(const struct ast_sorcery *sorc
const char *key = entry->key + strlen(family) + 2;
RAII_VAR(struct ast_json *, json, NULL, ast_json_unref);
struct ast_json_error error;
- RAII_VAR(struct ast_variable *, objset, NULL, ast_variables_destroy);
RAII_VAR(struct ast_variable *, existing, NULL, ast_variables_destroy);
void *object = NULL;
@@ -113,7 +112,7 @@ static void *sorcery_astdb_retrieve_fields_common(const struct ast_sorcery *sorc
}
if (!(object = ast_sorcery_alloc(sorcery, type, key)) ||
- ast_sorcery_objectset_apply(sorcery, object, objset)) {
+ ast_sorcery_objectset_apply(sorcery, object, existing)) {
ao2_cleanup(object);
return NULL;
}