diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-08 23:18:59 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-08 23:18:59 +0000 |
commit | 6b8aa660d02940208bbfe1d6a28c836b3ebabc27 (patch) | |
tree | ca2a3eb11ee6db00667d2cf18f7ccad6cd8fb354 /main/acl.c | |
parent | d68472f2294af72a6dd1f0b2f338801d2b3919f0 (diff) |
Don't output debug unless we asked for it
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53672 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/acl.c')
-rw-r--r-- | main/acl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/main/acl.c b/main/acl.c index 9000300f3..5d8c82380 100644 --- a/main/acl.c +++ b/main/acl.c @@ -196,7 +196,8 @@ struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path) ret = ha; } } - ast_log(LOG_DEBUG, "%s/%s appended to acl for peer\n", stuff, nm); + if (option_debug) + ast_log(LOG_DEBUG, "%s/%s appended to acl for peer\n", stuff, nm); return ret; } @@ -210,7 +211,8 @@ int ast_apply_ha(struct ast_ha *ha, struct sockaddr_in *sin) /* DEBUG */ ast_copy_string(iabuf, ast_inet_ntoa(sin->sin_addr), sizeof(iabuf)); ast_copy_string(iabuf2, ast_inet_ntoa(ha->netaddr), sizeof(iabuf2)); - ast_log(LOG_DEBUG, "##### Testing %s with %s\n", iabuf, iabuf2); + if (option_debug) + ast_log(LOG_DEBUG, "##### Testing %s with %s\n", iabuf, iabuf2); /* For each rule, if this address and the netmask = the net address apply the current rule */ if ((sin->sin_addr.s_addr & ha->netmask.s_addr) == ha->netaddr.s_addr) |