[asterisk-commits] irroot: branch irroot/asterisk-trunk-quack-queue r342987 - /team/irroot/aster...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 2 05:57:54 CDT 2011
Author: irroot
Date: Wed Nov 2 05:57:51 2011
New Revision: 342987
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=342987
Log:
fix ref problem in devicestate_tps
Modified:
team/irroot/asterisk-trunk-quack-queue/apps/app_queue.c
Modified: team/irroot/asterisk-trunk-quack-queue/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/asterisk-trunk-quack-queue/apps/app_queue.c?view=diff&rev=342987&r1=342986&r2=342987
==============================================================================
--- team/irroot/asterisk-trunk-quack-queue/apps/app_queue.c (original)
+++ team/irroot/asterisk-trunk-quack-queue/apps/app_queue.c Wed Nov 2 05:57:51 2011
@@ -1491,7 +1491,10 @@
ao2_ref(q, -1);
}
ao2_iterator_destroy(&qiter);
- ao2_ref(s, -1);
+
+ if (ao2_ref(s, -1) == 2) {
+ ao2_unlink(devices, s);
+ }
return 0;
}
@@ -1665,12 +1668,11 @@
if (s->status != status) {
s->status = status;
ao2_unlock(s);
- if (ast_taskprocessor_push(devicestate_tps, update_status, s)) {
- ao2_ref(s, -1);
+ if (!ast_taskprocessor_push(devicestate_tps, update_status, s)) {
+ ao2_ref(s, 1);
}
} else {
ao2_unlock(s);
- ao2_ref(s, -1);
}
ao2_unlock(m);
}
More information about the asterisk-commits
mailing list