transport: implement internal keepalive handling
commit6a24419ac8098641b65653969dabee59eaba66db
authorStefan Becker <chemobejk@gmail.com>
Tue, 22 Oct 2013 18:09:09 +0000 (22 21:09 +0300)
committerStefan Becker <chemobejk@gmail.com>
Tue, 22 Oct 2013 18:09:09 +0000 (22 21:09 +0300)
tree62f410ac8fdac1ea9053bdfeb3d47fc03fd6546e
parent62b6a39558ad617010a4fd70c9d213a2df46f5d6
transport: implement internal keepalive handling

Driving keepalive from the backend is one of those left-overs from our
libpurple roots. It doesn't really make sense to drive it from the
backend, because the backend doesn't know when we sent the last SIP
message to the server.

Replace the current implementation with a sip-transport.c internal
implementation:

- less network traffic, because at the usual 300 seconds we rarely or
  never have to send a keepalive message. Other timeouts, like calendar
  or RE-REGISTER, expire before we reach the keepalive timeout.

- only purple backend called sipe_core_transport_sip_keepalive()

- we can now send keepalive already during the REGISTER handshake. As we
  will receive the timeout value from the server only with the OK to
  this handshake, we initially use 60 seconds (needs testing). This
  should prevent SIP connection timeout for sloooooww handshakes, like
  TLS-DSK for Office 365 via mobile data connection in a moving vehicle.
src/core/sip-transport.c