Commit 5c654faa authored by Pekka Pessi's avatar Pekka Pessi
Browse files

nua_stack.c: include Allow-Events in most messages initiating dialog

The Allow-Events header is now included with NOTIFY, PUBLISH, REGISTER, and
initial INVITE, SUBSCRIBE, REFER, and OPTIONS, and also responses to
SUBSCRIBE, REFER, OPTIONS, and PUBLISH as well as responses to initial
INVITE and NOTIFY.

Thanks to Jerry Richards for pointing out the problem.

darcs-hash:20080401104910-65a35-0954012e92aa6809b2461dfdadde52ede8798edb.gz
parent 37e480e1
......@@ -1707,8 +1707,12 @@ int nua_server_respond(nua_server_request_t *sr, tagi_t const *tags)
sip_add_dup(msg, sip, (void *)NH_PGET(nh, allow)) < 0)
;
else if (!sip->sip_allow_events &&
(method == sip_method_publish || method == sip_method_subscribe) &&
NH_PGET(nh, allow_events) &&
(method == sip_method_publish || method == sip_method_subscribe ||
method == sip_method_options || method == sip_method_refer ||
(sr->sr_initial &&
(method == sip_method_invite ||
method == sip_method_notify))) &&
sip_add_dup(msg, sip, (void *)NH_PGET(nh, allow_events)) < 0)
;
else if (!sip->sip_contact && sr->sr_status < 300 && sr->sr_add_contact &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment