mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-16 09:46:22 +00:00
prevent duplicate 200 ... and some formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -7594,13 +7594,16 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
|
|||||||
found++;
|
found++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found)
|
if (found) {
|
||||||
transmit_response(p, "200 OK", req);
|
transmit_response(p, "200 OK", req);
|
||||||
else {
|
p->needdestroy = 1;
|
||||||
|
} else {
|
||||||
transmit_response(p, "403 Forbidden", req);
|
transmit_response(p, "403 Forbidden", req);
|
||||||
p->needdestroy = 1;
|
p->needdestroy = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
p->subscribed = 1;
|
p->subscribed = 1;
|
||||||
if (p->subscribed)
|
if (p->subscribed)
|
||||||
@@ -7620,9 +7623,10 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
|
|||||||
}
|
}
|
||||||
/* The next line can be removed if the SNOM200 Expires bug is fixed */
|
/* The next line can be removed if the SNOM200 Expires bug is fixed */
|
||||||
if (p->subscribed == 1) {
|
if (p->subscribed == 1) {
|
||||||
if (p->expiry>max_expiry)
|
if (p->expiry>max_expiry) {
|
||||||
p->expiry = max_expiry;
|
p->expiry = max_expiry;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
transmit_response(p, "200 OK", req);
|
transmit_response(p, "200 OK", req);
|
||||||
sip_scheddestroy(p, (p->expiry+10)*1000);
|
sip_scheddestroy(p, (p->expiry+10)*1000);
|
||||||
transmit_state_notify(p, ast_extension_state(NULL, p->context, p->exten),1);
|
transmit_state_notify(p, ast_extension_state(NULL, p->context, p->exten),1);
|
||||||
|
Reference in New Issue
Block a user