summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2010-10-01 04:09:08 +0000
committerBenny Prijono <bennylp@teluu.com>2010-10-01 04:09:08 +0000
commit8222a3a22a61dfbd1c443d662f0ec6d7c159b0fd (patch)
treea39e084740ccd6fae586b88b263fd5dbc01685bb
parent9387bf461ffdd514de322e995f9cd0b556511c54 (diff)
Misc (re #1134): added Supported header in outgoing SUBSCRIBE request. Although RFC 3265 says it is only optional, some downstream RFC may bring this requirement to SHOULD strength - e.g. RFC 5373 (thanks Johan Lantz for the suggestion)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3331 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsip-simple/evsub.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/pjsip/src/pjsip-simple/evsub.c b/pjsip/src/pjsip-simple/evsub.c
index c52b0b5f..c83786d0 100644
--- a/pjsip/src/pjsip-simple/evsub.c
+++ b/pjsip/src/pjsip-simple/evsub.c
@@ -997,6 +997,19 @@ PJ_DEF(pj_status_t) pjsip_evsub_initiate( pjsip_evsub *sub,
pjsip_msg_add_hdr( tdata->msg, (pjsip_hdr*)
pjsip_hdr_shallow_clone(tdata->pool, sub->expires));
+ /* Add Supported header (it's optional in RFC 3265, but some event package
+ * RFC may bring this requirement to SHOULD strength - e.g. RFC 5373)
+ */
+ {
+ const pjsip_hdr *hdr = pjsip_endpt_get_capability(sub->endpt,
+ PJSIP_H_SUPPORTED,
+ NULL);
+ if (hdr) {
+ pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)
+ pjsip_hdr_shallow_clone(tdata->pool, hdr));
+ }
+ }
+
/* Add Accept header: */
pjsip_msg_add_hdr( tdata->msg, (pjsip_hdr*)
pjsip_hdr_shallow_clone(tdata->pool, sub->accept));