[Home]

Summary:ASTERISK-15323: [patch] Manager hooks don't execute if there aren't any manager sessions
Reporter:Atis Lezdins (atis)Labels:
Date Opened:2009-12-16 11:27:42.000-0600Date Closed:2010-01-28 16:57:01.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/ManagerInterface
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) manager_hooks_16.patch
( 1) manager_hooks_b.patch
( 2) manager_hooks_trunk.patch
( 3) manager_hooks.patch
Description:I propose to add simple variable to count manager hooks.

Two sample patches attached, not sure which would be best.

All 1.6.x branches affected.
Comments:By: Atis Lezdins (atis) 2009-12-16 17:01:13.000-0600

Uploaded two new patches. For 1.6 check of manager_hooks is added, but for trunk added back exit from function in case there are neither sessions nor hooks.

By: Digium Subversion (svnbot) 2010-01-28 16:37:17.000-0600

Repository: asterisk
Revision: 243986

U   trunk/main/manager.c

------------------------------------------------------------------------
r243986 | jpeeler | 2010-01-28 16:37:16 -0600 (Thu, 28 Jan 2010) | 10 lines

Optimization to manager events.

When potentially sending manager events, return immediately if there are no
sessions or hooks. Also, avoid locking the hooks list if it is empty.

(issue ASTERISK-15323)
Reported by: atis
Patches:
     manager_hooks_trunk.patch uploaded by atis (license 242)

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

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

By: Digium Subversion (svnbot) 2010-01-28 16:50:22.000-0600

Repository: asterisk
Revision: 243987

U   branches/1.6.0/main/manager.c

------------------------------------------------------------------------
r243987 | jpeeler | 2010-01-28 16:50:22 -0600 (Thu, 28 Jan 2010) | 11 lines

Ensure manager hooks are executed when there are no manager sessions.

Conditional expanded to check for hooks before aborting manager event
processing. The other two changes are just optimizations.

(closes issue ASTERISK-15323)
Reported by: atis
Patches:
     manager_hooks_16.patch uploaded by atis (license 242)
Tested by: atis

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

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

By: Digium Subversion (svnbot) 2010-01-28 16:53:05.000-0600

Repository: asterisk
Revision: 243988

U   branches/1.6.1/main/manager.c

------------------------------------------------------------------------
r243988 | jpeeler | 2010-01-28 16:53:05 -0600 (Thu, 28 Jan 2010) | 11 lines

Ensure manager hooks are executed when there are no manager sessions.

Conditional expanded to check for hooks before aborting manager event
processing. The other two changes are just optimizations.

(closes issue ASTERISK-15323)
Reported by: atis
Patches:
    manager_hooks_16.patch uploaded by atis (license 242)
Tested by: atis

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

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

By: Digium Subversion (svnbot) 2010-01-28 16:57:00.000-0600

Repository: asterisk
Revision: 243989

U   branches/1.6.2/main/manager.c

------------------------------------------------------------------------
r243989 | jpeeler | 2010-01-28 16:57:00 -0600 (Thu, 28 Jan 2010) | 11 lines

Ensure manager hooks are executed when there are no manager sessions.

Conditional expanded to check for hooks before aborting manager event
processing. The other two changes are just optimizations.

(closes issue ASTERISK-15323)
Reported by: atis
Patches:
    manager_hooks_16.patch uploaded by atis (license 242)
Tested by: atis

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

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