[Home]

Summary:ASTERISK-12158: [patch] Superfluous AST_LIST_HEAD_DESTROY() for staticaly defined linked list in chan_agent and chan_local.
Reporter:Yuri (ys)Labels:
Date Opened:2008-06-07 06:13:37Date Closed:2008-06-07 09:13:05
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_agent_local.diff
Description:AST_LIST_HEAD_DESTROY() unneeded for linked list, that defined with AST_LIST_HEAD_STATIC() macro.
Resource associated with these lists are automaticaly released, if module unload (destructor for BSD).
Or no action required for linux based box.


****** ADDITIONAL INFORMATION ******

Message from FreeBSD box:

*CLI> module unload chan_agent.so
 == Unregistered channel type 'Agent'
 == Unregistered custom function AGENT
 == Unregistered application 'AgentLogin'
 == Unregistered application 'AgentMonitorOutgoing'
*CLI>   == Manager unregistered action Agents
 == Manager unregistered action AgentLogoff
[Jun  7 14:24:51] ERROR[50119]: /usr/home/asterisk/src/asterisk/include/asterisk/lock.h:367 __ast_pthread_mutex_destroy: chan_agent.c line 177 (__fini_agents): NOTICE: mutex '&(&agents)->lock' is uninitialized.


*CLI> module unload chan_local.so
 == Unregistered channel type 'Local'
[Jun  7 14:26:33] ERROR[50119]: /usr/home/asterisk/src/asterisk/include/asterisk/lock.h:367 __ast_pthread_mutex_destroy: chan_local.c line 123 (__fini_locals): NOTICE: mutex '&(&locals)->lock' is uninitialized.
*CLI>
Comments:By: Digium Subversion (svnbot) 2008-06-07 09:04:18

Repository: asterisk
Revision: 121078

U   branches/1.4/channels/chan_agent.c
U   branches/1.4/channels/chan_local.c

------------------------------------------------------------------------
r121078 | russell | 2008-06-07 09:04:15 -0500 (Sat, 07 Jun 2008) | 7 lines

Don't run LIST_HEAD_DESTROY on a STATIC list

(closes issue ASTERISK-12158)
Reported by: ys
Patches:
     chan_agent_local.diff uploaded by ys (license 281)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=121078

By: Digium Subversion (svnbot) 2008-06-07 09:12:07

Repository: asterisk
Revision: 121079

_U  trunk/
U   trunk/channels/chan_agent.c
U   trunk/channels/chan_local.c

------------------------------------------------------------------------
r121079 | russell | 2008-06-07 09:12:05 -0500 (Sat, 07 Jun 2008) | 15 lines

Merged revisions 121078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121078 | russell | 2008-06-07 09:10:56 -0500 (Sat, 07 Jun 2008) | 7 lines

Don't run LIST_HEAD_DESTROY on a STATIC list

(closes issue ASTERISK-12158)
Reported by: ys
Patches:
     chan_agent_local.diff uploaded by ys (license 281)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=121079

By: Digium Subversion (svnbot) 2008-06-07 09:13:05

Repository: asterisk
Revision: 121080

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_agent.c
U   branches/1.6.0/channels/chan_local.c

------------------------------------------------------------------------
r121080 | russell | 2008-06-07 09:13:04 -0500 (Sat, 07 Jun 2008) | 23 lines

Merged revisions 121079 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r121079 | russell | 2008-06-07 09:18:44 -0500 (Sat, 07 Jun 2008) | 15 lines

Merged revisions 121078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121078 | russell | 2008-06-07 09:10:56 -0500 (Sat, 07 Jun 2008) | 7 lines

Don't run LIST_HEAD_DESTROY on a STATIC list

(closes issue ASTERISK-12158)
Reported by: ys
Patches:
     chan_agent_local.diff uploaded by ys (license 281)

........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=121080