]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Prevent XMPP timeout on blank responses
authorKinsey Moore <kmoore@digium.com>
Sat, 7 Sep 2013 00:59:41 +0000 (00:59 +0000)
committerKinsey Moore <kmoore@digium.com>
Sat, 7 Sep 2013 00:59:41 +0000 (00:59 +0000)
commite688096e2bb46bae94349e8a0b093506b963425c
tree8c84b136db32555105a2580f043e537511e5bc4a
parent08be45178a41a002344efaa264630dd3ea082c77
Prevent XMPP timeout on blank responses

Sometimes the Google Voice servers have a bad habit of sending out 1
byte replies to the xmpp resource. When a blank 1 byte reply is
received from the socket the buffer attempts to wait (endlessly) for
the rest of the reply from google which effectively blocks the socket
and google voice calls will no longer come into the server.

This patch allows the xmpp module to correctly detect empty packets and
send out ping replies to google. It also sets a socket timeout on the
default socket which prevents the xmpp socket from closing and
preventing future google voice calls from coming into the server.

Furthermore instead of sending an empty reply back to google we send a
proper xmpp ping reply back. This also adds several more
socket messages.

(closes issue ASTERISK-22347)
Reported by: Andrew Nagy
Review: https://reviewboard.asterisk.org/r/2771
Patches:
    xmpp_fix_1.diff uploaded by Andrew Nagy (License #6524)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@398618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_xmpp.c