OSDN Git Service

obexd: Return dummy_data instead of int in phonebook-dummy
authorMarek Kasik <mkasik@redhat.com>
Thu, 30 Jun 2016 21:01:28 +0000 (17:01 -0400)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 4 Jul 2016 11:33:16 +0000 (14:33 +0300)
commit6c75f43e50d754b4605498a8a68d2be4bc19ee37
tree80263f83437f49f33461d7dcee5ca2a38066b853
parent16102009366f25a7ba3531c235d65461b5012372
obexd: Return dummy_data instead of int in phonebook-dummy

There are two functions in phonebook-dummy that were returning
'int's instead of 'struct dummy_data'

phonebook_create_cache
phonebook_get_entry

As a result, when an obex-client sends the GetSize command, the obexd
on the server segfaults.

Fix this by storing the id and returning the dummy_data struct.

The GetSize test now passes correctly.
obexd/plugins/phonebook-dummy.c