[Home]

Summary:ASTERISK-21036: Jitter Buffer log file creation doesn't account for multiple slashes in DAHDI channel names
Reporter:Richard Kenner (kenner)Labels:
Date Opened:2013-02-04 20:39:42.000-0600Date Closed:2013-09-18 14:58:01
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Jitterbuffer
Versions:10.7.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:DAHDI channels have two slashes, so both must be changed to '#' when forming the filename for the jitterbuffer log.

*_edited* Removed inline patch_

[Edit by Rusty Newton - adding quote from Richard's comment and the code from abstract_jb.c I believe he's talking about]
"Please ignore the patch. If you look at the code that changes '/' to '#', you'll see that it's done (in two places) with an "if" statement. Changing the token "if" to "while" in both places will fix this issue."

{noformat}
               if ((tmp = strchr(name2, '/'))) {
                       *tmp = '#';
               }

               bridged = ast_bridged_channel(chan);
               /* We should always have bridged chan if a jitterbuffer is in use */
               ast_assert(bridged != NULL);

               snprintf(name1, sizeof(name1), "%s", ast_channel_name(bridged));
               if ((tmp = strchr(name1, '/'))) {
                       *tmp = '#';
               }
{noformat}
Comments:By: Michael L. Young (elguero) 2013-02-05 15:07:07.348-0600

Richard, if you would like to contribute a patch, please take a look at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines#AsteriskIssueGuidelines-PatchandCodesubmission for details on how to submit a patch.

Also, Asterisk 10 is no longer supported when it comes to bug fixes, https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions.  So, any code submitted should be against a supported release, which currently is 1.8 or 11.

Thanks

By: Rusty Newton (rnewton) 2013-03-25 12:55:04.504-0500

Richard, can you attach the patch using the (More Actions > Attach Files) option?

By: Michael L. Young (elguero) 2013-03-25 15:51:09.218-0500

Richard,

Please follow the guidelines for patch submission.  I posted a link to those guidelines in my prior comment.

Also, please post the patch against 1.8 or 11 since those are the currently supported versions of Asterisk.

Thanks.

By: Richard Kenner (kenner) 2013-03-25 15:58:23.090-0500

Please ignore the patch.  If you look at the code that changes '/' to '#', you'll see that it's done (in two places) with an "if" statement.  Changing the token "if" to "while" in both places will fix this issue.

By: Kinsey Moore (kmoore) 2013-09-18 14:28:16.416-0500

The suggested changes look good. I'll be pushing them into 1.8, 11, 12, and trunk shortly.