Commit: d75eb5ca13413ca07aee08c17d9f1a33fbc7262a
Parent: 449bb25519158a87f9f547841c87fbd1cdb69dc1
Author: Simon Fels <simon.fels@canonical.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2015-10-20 14:05:02
Tree: 8c188a6e4fe2c13bbe04197e83dc7072f3f1cf6d

obexd: pbap: add headers correctly for size query When client queries for the size of a phonebook we fall into a indefinite loop as g_obex_apparam_encode always returns the same number of items added to the buffer regardless how often it is called. In former times where this code wasn't using GObexApparams a array was reduced each time the headers where added and so we could easily find out when we've added all headers. However today we need to solve this a bit differently by also setting the firstpacket flag when we receive the phonebook size result from the phonebook implementation which then lets us correctly go through without falling into a indefinite loop.

Diffstat

M obexd/plugins/pbap.c | 5 +++- -

1 files changed, 3 insertions(+), 2 deletions(-)

View Full Diff | Patch