@ -158,6 +158,7 @@ static struct mansession {
char inbuf [ AST_MAX_MANHEADER_LEN ] ;
char inbuf [ AST_MAX_MANHEADER_LEN ] ;
int inlen ;
int inlen ;
int send_events ;
int send_events ;
int displaysystemname ; /*!< Add system name to manager responses and events */
/* Queued events that we've not had the ability to send yet */
/* Queued events that we've not had the ability to send yet */
struct eventqent * eventq ;
struct eventqent * eventq ;
/* Timeout for ast_carefulwrite() */
/* Timeout for ast_carefulwrite() */
@ -772,6 +773,14 @@ static int authenticate(struct mansession *s, struct message *m)
while ( v ) {
while ( v ) {
if ( ! strcasecmp ( v - > name , " secret " ) ) {
if ( ! strcasecmp ( v - > name , " secret " ) ) {
password = v - > value ;
password = v - > value ;
} else if ( ! strcasecmp ( v - > name , " displaysystemname " ) ) {
if ( ast_true ( v - > value ) ) {
if ( ast_strlen_zero ( ast_config_AST_SYSTEM_NAME ) ) {
s - > displaysystemname = 1 ;
} else {
ast_log ( LOG_ERROR , " Can't enable displaysystemname in manager.conf - no system name configured in asterisk.conf \n " ) ;
}
}
} else if ( ! strcasecmp ( v - > name , " permit " ) | |
} else if ( ! strcasecmp ( v - > name , " permit " ) | |
! strcasecmp ( v - > name , " deny " ) ) {
! strcasecmp ( v - > name , " deny " ) ) {
ha = ast_append_ha ( v - > name , v - > value , ha ) ;
ha = ast_append_ha ( v - > name , v - > value , ha ) ;