[asterisk-commits] rmudgett: branch rmudgett/external_mwi r403561 - in /team/rmudgett/external_m...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Dec 9 13:29:39 CST 2013
Author: rmudgett
Date: Mon Dec 9 13:29:38 2013
New Revision: 403561
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403561
Log:
Resolve conflict and reset automerge.
Modified:
team/rmudgett/external_mwi/ (props changed)
team/rmudgett/external_mwi/main/endpoints.c
Propchange: team/rmudgett/external_mwi/
------------------------------------------------------------------------------
automerge = *
Propchange: team/rmudgett/external_mwi/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Mon Dec 9 13:29:38 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403290,403292-403398,403435,403458,403510,403527
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403290,403292-403398,403435,403458,403510,403527,403541-403542,403545,403559
Propchange: team/rmudgett/external_mwi/
------------------------------------------------------------------------------
--- external_mwi-integrated (original)
+++ external_mwi-integrated Mon Dec 9 13:29:38 2013
@@ -1,1 +1,1 @@
-/trunk:1-403538
+/trunk:1-403560
Modified: team/rmudgett/external_mwi/main/endpoints.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/external_mwi/main/endpoints.c?view=diff&rev=403561&r1=403560&r2=403561
==============================================================================
--- team/rmudgett/external_mwi/main/endpoints.c (original)
+++ team/rmudgett/external_mwi/main/endpoints.c Mon Dec 9 13:29:38 2013
@@ -388,8 +388,14 @@
static void endpoint_snapshot_dtor(void *obj)
{
struct ast_endpoint_snapshot *snapshot = obj;
+ int channel;
ast_assert(snapshot != NULL);
+
+ for (channel = 0; channel < snapshot->num_channels; channel++) {
+ ao2_ref(snapshot->channel_ids[channel], -1);
+ }
+
ast_string_field_free_memory(snapshot);
}
@@ -422,8 +428,8 @@
i = ao2_iterator_init(endpoint->channel_ids, 0);
while ((obj = ao2_iterator_next(&i))) {
- RAII_VAR(char *, channel_id, obj, ao2_cleanup);
- snapshot->channel_ids[snapshot->num_channels++] = channel_id;
+ /* The reference is kept so the channel id does not go away until the snapshot is gone */
+ snapshot->channel_ids[snapshot->num_channels++] = obj;
}
ao2_iterator_destroy(&i);
More information about the asterisk-commits
mailing list