In addition fix the reply generated by obc_transfer_create_dbus_reply to
not use a structure container instead use object, dict 'oa{sv}' as
indicated in the documentation.
This reverts commit 8a03376544.
The patch needs to be split up and the gdbus/ changes were bogus
compared to the original commit message.
Conflicts:
Makefile.am
Makefile.obexd
profiles/cyclingspeed/cyclingspeed.c
profiles/heartrate/heartrate.c
src/error.c
Instead of trying to include config.h in each file over the tree and
possibly forgetting to include it, give a "-include config.h" argument
to the compiler so it's guaranteed that a) it will be included for all
source files and b) it will be the first header included.
gdbus/ directory is left out, since it would break other projects using
it.
In case of message listing we need to send application
parameters in response and also it is required for sending
response to message listing size request.
For multiple subsequent request for message listing
we need to reset this variable to FALSE, so that each
time the get next header function is executed properly.
Once a message was already listed and inserted on the cache it could
not be listed again as the code was using the wrong key to lookup for
found messages then once we try to create the message again it fails
as the object already exists.
Invalid read of size 8
at 0x40EC04: g_obex_apparam_free (gobex-apparam.c:362)
by 0x41A66A: obc_transfer_free (transfer.c:272)
by 0x413221: pending_request_free (session.c:163)
by 0x413659: session_terminate_transfer (session.c:745)
by 0x41A53E: xfer_complete (transfer.c:518)
by 0x41B5D7: get_xfer_progress_first (transfer.c:562)
by 0x409750: handle_response (gobex.c:948)
by 0x40A609: incoming_data (gobex.c:1191)
by 0x371D047824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x371D047B57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x371D047F51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x40542F: main (main.c:175)
Address 0x4f64510 is 0 bytes inside a block of size 8 free'd
at 0x4A079AE: free (vg_replace_malloc.c:427)
by 0x371D04D50E: g_free (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x416060: phonebook_size_callback (pbap.c:266)
by 0x413651: session_terminate_transfer (session.c:743)
by 0x41A53E: xfer_complete (transfer.c:518)
by 0x41B5D7: get_xfer_progress_first (transfer.c:562)
by 0x409750: handle_response (gobex.c:948)
by 0x40A609: incoming_data (gobex.c:1191)
by 0x371D047824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x371D047B57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x371D047F51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x40542F: main (main.c:175)
Commit 15b15167fb2dd82e2189cc1955def1818a7bc6a6 broke the build:
plugins/messages.c:324:42: error: unknown type name ‘messages_update_inbox_cb’
plugins/messages.c:331:5: error: unknown type name ‘messages_set_read_cb’
plugins/messages.c:337:6: error: unknown type name ‘messages_set_delete_cb’
When the transfer file is opened in O_RDWR mode, just after the contents are
written to the file, the file offset has to be set to the beginning of the
file. If not subsequent read fails. This patch fixes this.
Attachment and charset are mandatory, so Message.Get now takes an
additional boolean parameter which the user application should set
if it wants the attachments to be downloaded, charset is always set
to UTF8.
This align the client timeout for GET operations with g_obex_get_req_pkt
which does use 60 seconds to cover for extra interaction during the first
packet.