Summary: | ASTERISK-14316: [patch] Log message does not match conditional check | ||
Reporter: | markd (markd) | Labels: | |
Date Opened: | 2009-06-15 07:48:19 | Date Closed: | 2009-06-26 15:18:50 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_voicemail |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 14voicemail.diff ( 1) trunkvoicemail.diff | |
Description: | I beleive the following lines to be incorrect. The comparitor should be ">=" and not "<=" or the log message should be reworded. if (maxsilence <= vmminsecs) ast_log(AST_LOG_WARNING, "maxsilence should be less than minmessage or you may get empty messages\n"); | ||
Comments: | By: David Brooks (dbrooks) 2009-06-15 15:03:16 In testing minmessage/minsecs vs maxsilence, I think there is more than one issue here. Looking into it. By: David Brooks (dbrooks) 2009-06-18 11:28:07 I think you were right, markd, The inequality was backwards. But in addition to that, maxsilence's value was in milliseconds, so it would always be greater than minmessage (unless your minmessage was in the thousands of seconds). These two patches (for 1.4 and trunk) should fix that. By: Digium Subversion (svnbot) 2009-06-26 15:03:43 Repository: asterisk Revision: 203719 U branches/1.4/apps/app_voicemail.c ------------------------------------------------------------------------ r203719 | dbrooks | 2009-06-26 15:03:43 -0500 (Fri, 26 Jun 2009) | 16 lines Fixing voicemail's error in checking max silence vs min message length Max silence was represented in milliseconds, yet vmminsecs (minmessage) was represented as seconds. Also, the inequality was reversed. The warning, if triggered, was "Max silence should be less than minmessage or you may get empty messages", which should have been logged if max silence was greater than minmessage, but the check was for less than. Also, conforming if statement to coding guidelines. closes issue ASTERISK-14316) Reported by: markd Review: https://reviewboard.asterisk.org/r/293/ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203719 By: Digium Subversion (svnbot) 2009-06-26 15:11:48 Repository: asterisk Revision: 203720 _U trunk/ ------------------------------------------------------------------------ r203720 | dbrooks | 2009-06-26 15:11:47 -0500 (Fri, 26 Jun 2009) | 22 lines Blocked revisions 203719 via svnmerge ........ r203719 | dbrooks | 2009-06-26 15:03:42 -0500 (Fri, 26 Jun 2009) | 16 lines Fixing voicemail's error in checking max silence vs min message length Max silence was represented in milliseconds, yet vmminsecs (minmessage) was represented as seconds. Also, the inequality was reversed. The warning, if triggered, was "Max silence should be less than minmessage or you may get empty messages", which should have been logged if max silence was greater than minmessage, but the check was for less than. Also, conforming if statement to coding guidelines. closes issue ASTERISK-14316) Reported by: markd Review: https://reviewboard.asterisk.org/r/293/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203720 By: Digium Subversion (svnbot) 2009-06-26 15:13:52 Repository: asterisk Revision: 203721 U trunk/apps/app_voicemail.c ------------------------------------------------------------------------ r203721 | dbrooks | 2009-06-26 15:13:52 -0500 (Fri, 26 Jun 2009) | 16 lines Fixing voicemail's error in checking max silence vs min message length Max silence was represented in milliseconds, yet vmminsecs (minmessage) was represented as seconds. Also, the inequality was reversed. The warning, if triggered, was "Max silence should be less than minmessage or you may get empty messages", which should have been logged if max silence was greater than minmessage, but the check was for less than. Also, conforming if statement to coding guidelines. closes issue ASTERISK-14316) Reported by: markd Review: https://reviewboard.asterisk.org/r/293/ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203721 By: Digium Subversion (svnbot) 2009-06-26 15:16:25 Repository: asterisk Revision: 203722 _U branches/1.6.0/ U branches/1.6.0/apps/app_voicemail.c ------------------------------------------------------------------------ r203722 | dbrooks | 2009-06-26 15:16:25 -0500 (Fri, 26 Jun 2009) | 23 lines Merged revisions 203721 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r203721 | dbrooks | 2009-06-26 15:13:51 -0500 (Fri, 26 Jun 2009) | 16 lines Fixing voicemail's error in checking max silence vs min message length Max silence was represented in milliseconds, yet vmminsecs (minmessage) was represented as seconds. Also, the inequality was reversed. The warning, if triggered, was "Max silence should be less than minmessage or you may get empty messages", which should have been logged if max silence was greater than minmessage, but the check was for less than. Also, conforming if statement to coding guidelines. closes issue ASTERISK-14316) Reported by: markd Review: https://reviewboard.asterisk.org/r/293/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203722 By: Digium Subversion (svnbot) 2009-06-26 15:18:12 Repository: asterisk Revision: 203727 _U branches/1.6.1/ U branches/1.6.1/apps/app_voicemail.c ------------------------------------------------------------------------ r203727 | dbrooks | 2009-06-26 15:18:11 -0500 (Fri, 26 Jun 2009) | 23 lines Merged revisions 203721 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r203721 | dbrooks | 2009-06-26 15:13:51 -0500 (Fri, 26 Jun 2009) | 16 lines Fixing voicemail's error in checking max silence vs min message length Max silence was represented in milliseconds, yet vmminsecs (minmessage) was represented as seconds. Also, the inequality was reversed. The warning, if triggered, was "Max silence should be less than minmessage or you may get empty messages", which should have been logged if max silence was greater than minmessage, but the check was for less than. Also, conforming if statement to coding guidelines. closes issue ASTERISK-14316) Reported by: markd Review: https://reviewboard.asterisk.org/r/293/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203727 By: Digium Subversion (svnbot) 2009-06-26 15:18:49 Repository: asterisk Revision: 203731 _U branches/1.6.2/ U branches/1.6.2/apps/app_voicemail.c ------------------------------------------------------------------------ r203731 | dbrooks | 2009-06-26 15:18:49 -0500 (Fri, 26 Jun 2009) | 23 lines Merged revisions 203721 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r203721 | dbrooks | 2009-06-26 15:13:51 -0500 (Fri, 26 Jun 2009) | 16 lines Fixing voicemail's error in checking max silence vs min message length Max silence was represented in milliseconds, yet vmminsecs (minmessage) was represented as seconds. Also, the inequality was reversed. The warning, if triggered, was "Max silence should be less than minmessage or you may get empty messages", which should have been logged if max silence was greater than minmessage, but the check was for less than. Also, conforming if statement to coding guidelines. closes issue ASTERISK-14316) Reported by: markd Review: https://reviewboard.asterisk.org/r/293/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203731 |