Review Board 1.7.16


0019287: inverse / incorrect behavior for CLI / console logging of DTMF

Review Request #1244 - Created June 1, 2011 and submitted

Jonathan Rose
1.8
19287
Reviewers
asterisk-dev
dvossel, russell
Asterisk
ast_network_puts_mutable writes to a connected console client only if it's level was set to false.  This changes that function to write it only if it is set to true to resolve the reverse behavior from expectations issue.

This seems like the way to go, but I can't see for the life of me why this mistake would be made if it really was just a mistake.  It's hard to say.
Just tested with a couple of connected clients.  I'll test more tomorrow.

Diff revision 3

This is not the most recent revision of the diff. The latest diff is revision 4. See what's changed.

1 2 3 4
1 2 3 4

  1. /branches/1.8/include/asterisk/logger.h: Loading...
  2. /branches/1.8/main/asterisk.c: Loading...
/branches/1.8/include/asterisk/logger.h
Revision 321530 New Change
[20] 95 lines
[+20] [+] void ast_console_puts(const char *string);
96
 */
96
 */
97
void ast_console_puts_mutable(const char *string, int level);
97
void ast_console_puts_mutable(const char *string, int level);
98
void ast_console_toggle_mute(int fd, int silent);
98
void ast_console_toggle_mute(int fd, int silent);
99

    
   
99

   
100
/*!
100
/*!
101
 * \since 1.6.1
101
 * \brief enables or disables logging of a specified level to the console

    
   
102
 * fd specifies the index of the console receiving the level change

    
   
103
 * level specifies the index of the logging level being toggled

    
   
104
 * state indicates whether logging will be on or off (0 for off, 1 for on)
102
 */
105
 */
103
void ast_console_toggle_loglevel(int fd, int level, int state);
106
void ast_console_toggle_loglevel(int fd, int level, int state);
104

    
   
107

   
105
/* Note: The AST_LOG_* macros below are the same as
108
/* Note: The AST_LOG_* macros below are the same as
106
 * the LOG_* macros and are intended to eventually replace
109
 * the LOG_* macros and are intended to eventually replace
[+20] [20] 210 lines
/branches/1.8/main/asterisk.c
Revision 321530 New Change
 
  1. /branches/1.8/include/asterisk/logger.h: Loading...
  2. /branches/1.8/main/asterisk.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.