[asterisk-bugs] [Asterisk 0011505]: [patch] Chash after Monitor w/o options

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Dec 11 14:03:50 CST 2007


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11505 
====================================================================== 
Reported By:                Mike Anikienko
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   11505
Category:                   Resources/res_monitor
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!): 92206 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             12-10-2007 13:00 CST
Last Modified:              12-11-2007 14:03 CST
====================================================================== 
Summary:                    [patch] Chash after Monitor w/o options
Description: 
For example, call from SIP to SIP with recording. But Monitor without
options. exten => s,n,Monitor(alaw,${CALLFILENAME})

    -- Executing [s at macro-record_call:4] Monitor("SIP/712-082a6768",
"alaw,20071210-213317-712-612") in new stack
(core dumped)


In backtrace I see:
http://bugs.digium.com/view.php?id=1  0xb7fbd5ae in start_monitor_exec
(chan=0x833c218, data=0xb6a18d58) at
res_monitor.c:447

In res_monitor.c I see:
        char *arg = NULL;
        char *options = NULL;
        int stream_action = X_REC_IN | X_REC_OUT;
...

        AST_DECLARE_APP_ARGS(args,
                AST_APP_ARG(format);
                AST_APP_ARG(fname_base);
                AST_APP_ARG(options);
        );

        /* Parse arguments. */
        if (ast_strlen_zero((char*)data)) {
                ast_log(LOG_ERROR, "Monitor requires an argument\n");
                return 0;
        }

        parse = ast_strdupa((char*)data);
        AST_STANDARD_APP_ARGS(args, parse);

        if (strchr(args.options, 'm'))
                stream_action |= X_JOIN;
...

Where initialization and parsing args.options? args.options is NULL !!!

I have studied app_dial and have made this small patch.
====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 12-11-07 14:03  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 92365

U   trunk/res/res_monitor.c

------------------------------------------------------------------------
r92365 | file | 2007-12-11 14:03:46 -0600 (Tue, 11 Dec 2007) | 4 lines

Only look to see if options are set if some have been provided.
(closes issue http://bugs.digium.com/view.php?id=11505)
Reported by: Mike Anikienko

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

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

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-11-07 14:03  svnbot         Checkin                                      
12-11-07 14:03  svnbot         Note Added: 0075235                          
12-11-07 14:03  svnbot         Status                   new => assigned     
12-11-07 14:03  svnbot         Assigned To               => file            
======================================================================




More information about the asterisk-bugs mailing list