[asterisk-bugs] [Asterisk 0013351]: [patch] Manager action SipNotify disconnecting the manager session on error

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Aug 22 15:12:04 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13351 
====================================================================== 
Reported By:                Laureano
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13351
Category:                   Core/ManagerInterface
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 139277 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-20 22:42 CDT
Last Modified:              2008-08-22 15:12 CDT
====================================================================== 
Summary:                    [patch] Manager action SipNotify disconnecting the
manager session on error
Description: 
Sending an SipNotify action without a Channel header or with an invalid
channel will disconnect from the current manager session. This is caused by
the return value of the funcion manager_sipnotify (-1).
As far I can see, other implementations of manager action functions always
return 0, even on error. Also, the channel header is not being correctly
checked.

The uploaded patch fixes both issues.
====================================================================== 

---------------------------------------------------------------------- 
 (0091661) svnbot (reporter) - 2008-08-22 15:12
 http://bugs.digium.com/view.php?id=13351#c91661 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 139563

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r139563 | mmichelson | 2008-08-22 15:12:03 -0500 (Fri, 22 Aug 2008) | 15
lines

The -1 return value from incomplete or improper
headers for the SipNotify manager command was
causing the current manager session to become
disconnected. Change the return value to 0 for
these cases.

Also change a test for a NULL pointer to be
ast_strlen_zero instead.

(closes issue http://bugs.digium.com/view.php?id=13351)
Reported by: Laureano
Patches:
      sipnotify_action_fix.patch uploaded by Laureano (license 265)


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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-22 15:12 svnbot         Checkin                                      
2008-08-22 15:12 svnbot         Note Added: 0091661                          
======================================================================




More information about the asterisk-bugs mailing list