<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10638">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Joshua Colp: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">astobj2: Create function to copy weak proxied objects from container.<br><br>Create ao2_container_dup_weakproxy_objs to perform a similar function to<br>ao2_container_dup. This function expects the source container to have<br>weakproxy objects, inserts the associated non-weak objects into the<br>destination container. Orphaned weakproxy objects are ignored.<br><br>Create test for this new function and for ao2_weakproxy_find.<br><br>Change-Id: I898387f058057e08696fe9070f8cd94ef3a27482<br>---<br>M include/asterisk/astobj2.h<br>M main/astobj2_container.c<br>M tests/test_astobj2_weaken.c<br>3 files changed, 233 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h</span><br><span>index 39933c7..03ef947 100644</span><br><span>--- a/include/asterisk/astobj2.h</span><br><span>+++ b/include/asterisk/astobj2.h</span><br><span>@@ -1420,6 +1420,28 @@</span><br><span> int ao2_container_dup(struct ao2_container *dest, struct ao2_container *src, enum search_flags flags);</span><br><span> </span><br><span> /*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Copy object references associated with src container weakproxies into the dest container.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param dest Container to copy src strong object references into.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param src Container to copy all weak object references from.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param flags OBJ_NOLOCK if a lock is already held on both containers.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Otherwise, the src container is locked first.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \pre The dest container must be empty. If the duplication fails, the</span><br><span style="color: hsl(120, 100%, 40%);">+ * dest container will be returned empty.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \note This can potentially be expensive because a malloc is</span><br><span style="color: hsl(120, 100%, 40%);">+ * needed for every object in the src container.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \note Every object inside the container is locked by \ref ao2_weakproxy_get_object.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Any weakproxy in \ref src with no associated object is ignored.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval 0 on success.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval -1 on error.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+int ao2_container_dup_weakproxy_objs(struct ao2_container *dest, struct ao2_container *src, enum search_flags flags);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span> * \brief Create a clone/copy of the given container.</span><br><span> * \since 11.0</span><br><span> *</span><br><span>diff --git a/main/astobj2_container.c b/main/astobj2_container.c</span><br><span>index 5197867..9a837bd 100644</span><br><span>--- a/main/astobj2_container.c</span><br><span>+++ b/main/astobj2_container.c</span><br><span>@@ -697,6 +697,59 @@</span><br><span> return res;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Copy obj associated with a weakproxy into the arg container.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param proxy pointer to the weakproxy.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param arg callback argument from ao2_callback()</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param flags flags from ao2_callback()</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval 0 on success.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval CMP_STOP|CMP_MATCH on error.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+static int dup_weakproxy_cb(void *proxy, void *arg, int flags)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ void *obj = ao2_weakproxy_get_object(proxy, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ao2_container *dest = arg;</span><br><span style="color: hsl(120, 100%, 40%);">+ int ret;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!obj) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ret = ao2_t_link_flags(dest, obj, OBJ_NOLOCK, NULL) ? 0 : (CMP_MATCH | CMP_STOP);</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_ref(obj, -1);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return ret;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+int ao2_container_dup_weakproxy_objs(struct ao2_container *dest, struct ao2_container *src, enum search_flags flags)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ void *obj;</span><br><span style="color: hsl(120, 100%, 40%);">+ int res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!(flags & OBJ_NOLOCK)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_rdlock(src);</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_wrlock(dest);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ obj = ao2_callback(src, OBJ_NOLOCK, dup_weakproxy_cb, dest);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (obj) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Failed to put this obj into the dest container. */</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_t_ref(obj, -1, "Failed to put this object into the dest container.");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Remove all items from the dest container. */</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_t_callback(dest, OBJ_NOLOCK | OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL,</span><br><span style="color: hsl(120, 100%, 40%);">+ NULL, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+ res = -1;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!(flags & OBJ_NOLOCK)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_unlock(dest);</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_unlock(src);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return res;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> struct ao2_container *__ao2_container_clone(struct ao2_container *orig, enum search_flags flags, const char *tag, const char *file, int line, const char *func)</span><br><span> {</span><br><span> struct ao2_container *clone;</span><br><span>diff --git a/tests/test_astobj2_weaken.c b/tests/test_astobj2_weaken.c</span><br><span>index 2755b6e..13f48ac 100644</span><br><span>--- a/tests/test_astobj2_weaken.c</span><br><span>+++ b/tests/test_astobj2_weaken.c</span><br><span>@@ -262,9 +262,166 @@</span><br><span> return AST_TEST_FAIL;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+struct strong_str {</span><br><span style="color: hsl(120, 100%, 40%);">+ char *value;</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+struct weakproxy_str {</span><br><span style="color: hsl(120, 100%, 40%);">+ AO2_WEAKPROXY();</span><br><span style="color: hsl(120, 100%, 40%);">+ char value[0];</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static struct strong_str *alloc_str(struct ao2_container *weakcontainer, const char *value)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ struct strong_str *strong = ao2_t_alloc(sizeof(*strong), NULL, value);</span><br><span style="color: hsl(120, 100%, 40%);">+ struct weakproxy_str *weak = ao2_weakproxy_alloc(sizeof(*weak) + strlen(value) + 1, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!weak || !strong) {</span><br><span style="color: hsl(120, 100%, 40%);">+ goto error_return;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ strcpy(weak->value, value); /*SAFE*/</span><br><span style="color: hsl(120, 100%, 40%);">+ strong->value = weak->value;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ao2_weakproxy_set_object(weak, strong, 0)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ goto error_return;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!ao2_link(weakcontainer, weak)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ goto error_return;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_ref(weak, -1);</span><br><span style="color: hsl(120, 100%, 40%);">+ return strong;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+error_return:</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(weak);</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(strong);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+AO2_STRING_FIELD_HASH_FN(weakproxy_str, value);</span><br><span style="color: hsl(120, 100%, 40%);">+AO2_STRING_FIELD_CMP_FN(weakproxy_str, value);</span><br><span style="color: hsl(120, 100%, 40%);">+AO2_STRING_FIELD_SORT_FN(strong_str, value);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define ITERATOR_CHECK_NEXT(iter, var, expected) \</span><br><span style="color: hsl(120, 100%, 40%);">+ do { \</span><br><span style="color: hsl(120, 100%, 40%);">+ var = ao2_iterator_next(iter); \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_validate_cleanup(test, var == expected, ret, cleanup); \</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(var); \</span><br><span style="color: hsl(120, 100%, 40%);">+ } while (0)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define WEAKFIND_CHECK(c, key, var, expected) \</span><br><span style="color: hsl(120, 100%, 40%);">+ do { \</span><br><span style="color: hsl(120, 100%, 40%);">+ var = ao2_weakproxy_find(c, key, OBJ_SEARCH_KEY, ""); \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_validate_cleanup(test, var == expected, ret, cleanup); \</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(var); \</span><br><span style="color: hsl(120, 100%, 40%);">+ } while (0)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+AST_TEST_DEFINE(astobj2_weak_container)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ int ret = AST_TEST_FAIL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ struct strong_str *strong1 = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct strong_str *strong2 = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct strong_str *strong3 = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ struct strong_str *strong = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ao2_container *weakcontainer = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ao2_container *dupcontainer = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ao2_iterator iter;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ switch (cmd) {</span><br><span style="color: hsl(120, 100%, 40%);">+ case TEST_INIT:</span><br><span style="color: hsl(120, 100%, 40%);">+ info->name = "astobj2_weak_container";</span><br><span style="color: hsl(120, 100%, 40%);">+ info->category = "/main/astobj2/";</span><br><span style="color: hsl(120, 100%, 40%);">+ info->summary = "Test ao2 weak containers";</span><br><span style="color: hsl(120, 100%, 40%);">+ info->description = "Test ao2 weak containers.";</span><br><span style="color: hsl(120, 100%, 40%);">+ return AST_TEST_NOT_RUN;</span><br><span style="color: hsl(120, 100%, 40%);">+ case TEST_EXECUTE:</span><br><span style="color: hsl(120, 100%, 40%);">+ break;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ weakcontainer = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_MUTEX, 0, 7,</span><br><span style="color: hsl(120, 100%, 40%);">+ weakproxy_str_hash_fn, NULL, weakproxy_str_cmp_fn);</span><br><span style="color: hsl(120, 100%, 40%);">+ dupcontainer = ao2_container_alloc_list(AO2_ALLOC_OPT_LOCK_MUTEX, 0,</span><br><span style="color: hsl(120, 100%, 40%);">+ strong_str_sort_fn, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!weakcontainer || !dupcontainer) {</span><br><span style="color: hsl(120, 100%, 40%);">+ goto cleanup;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ strong1 = alloc_str(weakcontainer, "obj1");</span><br><span style="color: hsl(120, 100%, 40%);">+ strong2 = alloc_str(weakcontainer, "obj2");</span><br><span style="color: hsl(120, 100%, 40%);">+ strong3 = alloc_str(weakcontainer, "obj3");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!strong1 || !strong2 || !strong3) {</span><br><span style="color: hsl(120, 100%, 40%);">+ goto cleanup;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ao2_container_dup_weakproxy_objs(dupcontainer, weakcontainer, 0)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ goto cleanup;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ iter = ao2_iterator_init(dupcontainer, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ ITERATOR_CHECK_NEXT(&iter, strong, strong1);</span><br><span style="color: hsl(120, 100%, 40%);">+ ITERATOR_CHECK_NEXT(&iter, strong, strong2);</span><br><span style="color: hsl(120, 100%, 40%);">+ ITERATOR_CHECK_NEXT(&iter, strong, strong3);</span><br><span style="color: hsl(120, 100%, 40%);">+ ITERATOR_CHECK_NEXT(&iter, strong, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_iterator_cleanup(&iter);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_callback(dupcontainer, OBJ_NODATA | OBJ_UNLINK | OBJ_MULTIPLE, NULL, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ WEAKFIND_CHECK(weakcontainer, "obj1", strong, strong1);</span><br><span style="color: hsl(120, 100%, 40%);">+ WEAKFIND_CHECK(weakcontainer, "obj2", strong, strong2);</span><br><span style="color: hsl(120, 100%, 40%);">+ WEAKFIND_CHECK(weakcontainer, "obj3", strong, strong3);</span><br><span style="color: hsl(120, 100%, 40%);">+ WEAKFIND_CHECK(weakcontainer, "unknown", strong, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* This will orphan "obj2" in weakcontainer. */</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_replace(strong2, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ao2_container_dup_weakproxy_objs(dupcontainer, weakcontainer, 0)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ goto cleanup;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_validate_cleanup(test,</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_container_count(weakcontainer) == ao2_container_count(dupcontainer) + 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ ret,</span><br><span style="color: hsl(120, 100%, 40%);">+ cleanup);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ iter = ao2_iterator_init(dupcontainer, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ ITERATOR_CHECK_NEXT(&iter, strong, strong1);</span><br><span style="color: hsl(120, 100%, 40%);">+ ITERATOR_CHECK_NEXT(&iter, strong, strong3);</span><br><span style="color: hsl(120, 100%, 40%);">+ ITERATOR_CHECK_NEXT(&iter, strong, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_iterator_cleanup(&iter);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ WEAKFIND_CHECK(weakcontainer, "obj1", strong, strong1);</span><br><span style="color: hsl(120, 100%, 40%);">+ WEAKFIND_CHECK(weakcontainer, "obj2", strong, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+ WEAKFIND_CHECK(weakcontainer, "obj3", strong, strong3);</span><br><span style="color: hsl(120, 100%, 40%);">+ WEAKFIND_CHECK(weakcontainer, "unknown", strong, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ret = AST_TEST_PASS;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+cleanup:</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(strong1);</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(strong2);</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(strong3);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(weakcontainer);</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(dupcontainer);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(strong);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return ret;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static int unload_module(void)</span><br><span> {</span><br><span> AST_TEST_UNREGISTER(astobj2_weak1);</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_TEST_UNREGISTER(astobj2_weak_container);</span><br><span> </span><br><span> return 0;</span><br><span> }</span><br><span>@@ -272,6 +429,7 @@</span><br><span> static int load_module(void)</span><br><span> {</span><br><span> AST_TEST_REGISTER(astobj2_weak1);</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_TEST_REGISTER(astobj2_weak_container);</span><br><span> </span><br><span> return AST_MODULE_LOAD_SUCCESS;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10638">change 10638</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10638"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I898387f058057e08696fe9070f8cd94ef3a27482 </div>
<div style="display:none"> Gerrit-Change-Number: 10638 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>