diff options
author | Mark Michelson <mmichelson@digium.com> | 2014-09-18 16:09:25 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2014-09-18 16:09:25 +0000 |
commit | 79eac1ffcaa419a2c21c43dc9f1c26dda92594f9 (patch) | |
tree | 1f3a9272d8a70d968e0401e9bcc2df524c7eb096 /contrib | |
parent | 126334a7aa9a8ba27e5abe02f1a07e526675aab4 (diff) |
res_pjsip_pubsub: Add some type safety when generating NOTIFY bodies.
res_pjsip_pubsub has two separate checks that it makes when a SUBSCRIBE
arrives.
* It checks that there is a subscription handler for the Event
* It checks that there are body generators for the types in the Accept header
The problem is, there's nothing that ensures that these two things will
actually mesh with each other. For instance, Asterisk will accept a subscription
to MWI that accepts pidf+xml bodies. That doesn't make sense.
With this commit, we add some type information to the mix. Subscription
handlers state they generate data of type X, and body generators state
that they consume data of type X. This way, Asterisk doesn't end up in
some hilariously mismatched situation like the one in the previous paragraph.
ASTERISK-24136 #close
Reported by Mark Michelson
Review: https://reviewboard.asterisk.org/r/3877
Review: https://reviewboard.asterisk.org/r/3878
........
Merged revisions 423344 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 423348 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions