[Asterisk-code-review] sorcery: Fix sorcery wizard create so it creates in caches (asterisk[13])
George Joseph
asteriskteam at digium.com
Thu Feb 25 15:20:18 CST 2016
George Joseph has uploaded a new change for review.
https://gerrit.asterisk.org/2312
Change subject: sorcery: Fix sorcery_wizard_create so it creates in caches
......................................................................
sorcery: Fix sorcery_wizard_create so it creates in caches
Although sorcery_wizard_update and sorcery_wizard_delete operated on
caches, sorcery_memory_create didn't. It looks like this was just a
mis-ordering of the return conditional predicates rather than a specific
exclusion.
This issue was preventing contacts from getting added to a memory_cache
when they were created.
ASTERISK-25811 #close
Reported-by: Ross Beer
Change-Id: Id5596ce691685a79886e57b0865888458d6e7b46
---
M main/sorcery.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/12/2312/1
diff --git a/main/sorcery.c b/main/sorcery.c
index 774d001..338f307 100644
--- a/main/sorcery.c
+++ b/main/sorcery.c
@@ -1953,7 +1953,9 @@
ast_debug(5, "Sorcery wizard '%s' does not support creation\n", object_wizard->wizard->callbacks.name);
return 0;
}
- return (!object_wizard->caching && !object_wizard->wizard->callbacks.create(details->sorcery, object_wizard->data, details->obj)) ? CMP_MATCH | CMP_STOP : 0;
+
+ return (!object_wizard->wizard->callbacks.create(details->sorcery, object_wizard->data, details->obj) &&
+ !object_wizard->caching) ? CMP_MATCH | CMP_STOP : 0;
}
/*! \brief Internal callback function which notifies an individual observer that an object has been created */
--
To view, visit https://gerrit.asterisk.org/2312
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5596ce691685a79886e57b0865888458d6e7b46
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
More information about the asterisk-code-review
mailing list