[Asterisk-code-review] res smdi.c: Fix module ref counting and inverted test. (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Tue Oct 2 18:43:20 CDT 2018
Hello Jenkins2,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/10379
to look at the new patch set (#2).
Change subject: res_smdi.c: Fix module ref counting and inverted test.
......................................................................
res_smdi.c: Fix module ref counting and inverted test.
I think this module is so screwed up that it doesn't work anymore. Even
with these attempts to fix things it still won't gracefully shut down.
The module refs will not go to zero to allow unloading the module.
* Fix module ref counting dealing with the SMDI interface object. There
were several off-nominal paths that unbalanced the module ref count. Also
the destructor freed the ao2 object itself which is bad. Made the
smdi_read thread not hold its own ref to the SMDI interface object so when
all refs go away the destructor will stop the listener thread.
* Fixed the smdi_load() return code of 1 concerning the number of
listeners. The test was inverted.
Change-Id: Ic288db51b58e395d6a2fc3847f77176c16988784
---
M res/res_smdi.c
1 file changed, 18 insertions(+), 12 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/79/10379/2
--
To view, visit https://gerrit.asterisk.org/10379
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic288db51b58e395d6a2fc3847f77176c16988784
Gerrit-Change-Number: 10379
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Jenkins2 (1000185)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181002/d766202e/attachment.html>
More information about the asterisk-code-review
mailing list