processone/ejabberd — pull request #205 by weiss (2014-05-09 19:25:18+00:00)
Title: XEP-0198: Improve handling of incorrect stanza counts reported by client

There are corner cases where certain clients report a negative or a too large number of handled stanzas in the `h` attributes of the `a` or `resume` elements they send (yes, I'm looking at you, ChatSecure!). Let ejabberd

* ignore/reject those elements with a negative `h` value, and
* adjust ejabberd's count to the client's value if the latter is too large (i.e., larger than the number of stanzas sent by ejabberd).