[asterisk-commits] tilghman: trunk r252442 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Mar 14 23:25:41 CDT 2010
Author: tilghman
Date: Sun Mar 14 23:25:35 2010
New Revision: 252442
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=252442
Log:
THIS IS NOT PYTHON. Indentation doesn't matter, only braces do.
(closes issue #17025)
Reported by: smurfix
Patches:
sip.patch uploaded by smurfix (license 547)
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=252442&r1=252441&r2=252442
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sun Mar 14 23:25:35 2010
@@ -12042,15 +12042,30 @@
/* URI not found */
if (res == AUTH_PEER_NOT_DYNAMIC) {
transmit_response(p, "403 Forbidden", &p->initreq);
- if (global_authfailureevents)
- manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Rejected\r\nCause: AUTH_PEER_NOT_DYNAMIC\r\nAddress: %s\r\nPort: %d\r\n",
+ if (global_authfailureevents) {
+ manager_event(EVENT_FLAG_SYSTEM, "PeerStatus",
+ "ChannelType: SIP\r\n"
+ "Peer: SIP/%s\r\n"
+ "PeerStatus: Rejected\r\n"
+ "Cause: AUTH_PEER_NOT_DYNAMIC\r\n"
+ "Address: %s\r\n"
+ "Port: %d\r\n",
name, ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
}
- else
+ } else {
transmit_response(p, "404 Not found", &p->initreq);
- if (global_authfailureevents)
- manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Rejected\r\nCause: %s\r\nAddress: %s\r\nPort: %d\r\n",
- name, (res == AUTH_USERNAME_MISMATCH) ? "AUTH_USERNAME_MISMATCH" : "URI_NOT_FOUND", ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
+ if (global_authfailureevents) {
+ manager_event(EVENT_FLAG_SYSTEM, "PeerStatus",
+ "ChannelType: SIP\r\n"
+ "Peer: SIP/%s\r\n"
+ "PeerStatus: Rejected\r\n"
+ "Cause: %s\r\n"
+ "Address: %s\r\n"
+ "Port: %d\r\n",
+ name, (res == AUTH_USERNAME_MISMATCH) ? "AUTH_USERNAME_MISMATCH" : "URI_NOT_FOUND",
+ ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
+ }
+ }
}
break;
case AUTH_BAD_TRANSPORT:
More information about the asterisk-commits
mailing list