From d2c34232ab046c9d8a004d8a1d919731a94cc70a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 12 Jan 2011 15:32:05 -0600 Subject: [PATCH] fix userauth issue --- src/mod/event_handlers/mod_event_socket/mod_event_socket.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index 0ebf6d5b53..344b0ee117 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -1548,7 +1548,7 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even char api_reply[512] = "Allowed-API: all\n"; char log_reply[512] = ""; int allowed_log = 1; - + char *tmp; switch_clear_flag(listener, LFLAG_ALLOW_LOG); @@ -1564,8 +1564,9 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t **even *pass++ = '\0'; } - if ((pass = strchr(user, ':'))) { - *pass++ = '\0'; + if ((tmp = strchr(user, ':'))) { + *tmp++ = '\0'; + pass = tmp; } if (zstr(user) || zstr(domain_name)) {