diff options
author | twisted <twisted@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-09-13 01:38:00 +0000 |
---|---|---|
committer | twisted <twisted@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-09-13 01:38:00 +0000 |
commit | 3b6ad1900827d6d38f401ebdd7da6385a6aaf1a7 (patch) | |
tree | 5d841b7b3acbe98af31b711175cf80e48fdc0aea | |
parent | f6e341b9c32bf3c66f3ac5239abe572261cb2854 (diff) |
don't send a 200 ACK before a 404 on invalid subscriptions (Bug #5198)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6565 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | channels/chan_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 769e67ebd..9040def6f 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10213,7 +10213,6 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, } if (sipdebug || option_debug > 1) ast_log(LOG_DEBUG, "Adding subscription for extension %s context %s for peer %s\n", p->exten, p->context, p->username); - transmit_response(p, "200 OK", req); if (p->autokillid > -1) sip_cancel_destroy(p); /* Remove subscription expiry for renewals */ sip_scheddestroy(p, (p->expiry + 10) * 1000); /* Set timer for destruction of call at expiration */ @@ -10224,6 +10223,7 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, ast_set_flag(p, SIP_NEEDDESTROY); return 0; } else { + transmit_response(p, "200 OK", req); transmit_state_notify(p, firststate, 1, 1); /* Send first notification */ append_history(p, "Subscribestatus", ast_extension_state2str(firststate)); } |