diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-21 23:54:28 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-21 23:54:28 +0000 |
commit | a2f8bfa50e1b5bfa25d204db9e7d90654132d269 (patch) | |
tree | 95c9b149160570f12a0f7eee1f45273ff8708341 /channels | |
parent | 335e27bbdebd6d729df9e1f3cb4da00063a62c3c (diff) |
strcmp() is the right function to use here, not strncmp().
On passing simplify an ast_cli message nearby.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@29234 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 856fe2403..4770f57b4 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9362,19 +9362,16 @@ static int sip_do_debug(int fd, int argc, char *argv[]) if (argc != 2) { if (argc != 4) return RESULT_SHOWUSAGE; - else if (strncmp(argv[2], "ip", 3) == 0) + else if (strcmp(argv[2], "ip") == 0) return sip_do_debug_ip(fd, argc, argv); - else if (strncmp(argv[2], "peer", 5) == 0) + else if (strcmp(argv[2], "peer") == 0) return sip_do_debug_peer(fd, argc, argv); else return RESULT_SHOWUSAGE; } ast_set_flag(&global_flags[1], SIP_PAGE2_DEBUG_CONSOLE); memset(&debugaddr, 0, sizeof(debugaddr)); - if (oldsipdebug) - ast_cli(fd, "SIP Debugging re-enabled\n"); - else - ast_cli(fd, "SIP Debugging enabled\n"); + ast_cli(fd, "SIP Debugging %senabled\n", oldsipdebug ? "re-" : ""); return RESULT_SUCCESS; } |