Mikel Astiz
902f089da6
obexd: expose obc_transfer_set_callback
...
This will allow setting the callback before the transfer is started,
particularly to report queued transfer cancellations.
2012-12-04 22:48:54 +01:00
Mikel Astiz
5189cfee80
obexd: process transfer queue only if none active
...
session_process_queue should make sure there is no active operation, to
avoid starting a second one at the same time.
2012-12-04 22:48:54 +01:00
Mikel Astiz
ffb675e39a
obexd: fix cancel when no agent present
...
The authorization check should consider the scenario of no agent being
assigned to the transfer.
2012-12-04 22:48:54 +01:00
Mikel Astiz
7b944e8f00
obexd: fix obc_session_get_buffer
...
Size 0 should be reported if no transfer exists. Some existing code
relies on this behavior.
2012-12-04 22:48:54 +01:00
Mikel Astiz
2e1ab9b75d
obexd: queue transfers in pbap sessions
...
Previous implementation reported busy when trying to queue several
operations in the same session.
2012-12-04 22:48:54 +01:00
Mikel Astiz
2e6096423c
obexd: queue transfers in ftp sessions
...
Previous implementation reported busy when trying to queue several
transfers in the same session.
2012-12-04 22:48:54 +01:00
Mikel Astiz
64e3360bf6
obexd: fix pbap select when same path given twice
...
If the same path is selected twice, the operation can be skipped but the
D-Bus response should still be sent.
2012-12-04 22:48:53 +01:00
Mikel Astiz
aae5348e9d
obexd: fix incorrect error check
...
Previous statement always returned success.
2012-12-04 22:48:53 +01:00
Mikel Astiz
46e41cbc06
obexd: fix unreported error case
...
The authorization request of a queued transfer could fail, and this
needs to be reported to the transfer initiator. Otherwise it would
likely result in D-Bus timeouts.
2012-12-04 22:48:53 +01:00
Mikel Astiz
5655cb9c50
obexd: fix memory leak in obc_session_put
...
obc_session_put takes ownership of the given buffer, but did not free
the memory in case of error.
2012-12-04 22:48:53 +01:00
Luiz Augusto von Dentz
318dfd0916
obexd: Add L2CAP support in bluetooth module
...
This adds support for reading GoepL2capPsm attribute from sdp record
and connect to it.
2012-12-04 22:48:53 +01:00
Luiz Augusto von Dentz
8303363e6e
obexd: Fix sending GET while SRM is active
...
If SRM is active remote will be generating responses automatically
2012-12-04 22:48:53 +01:00
Luiz Augusto von Dentz
922d181945
obexd: remove gobex dependency of session
...
Modules should no longer need to access gobex directly
2012-12-04 22:48:53 +01:00
Luiz Augusto von Dentz
fcc8068de6
obexd: remove use of gobex in ftp module
...
gobex should not be use directly as it can interfere with ongoing
requests of the session.
2012-12-04 22:48:53 +01:00
Luiz Augusto von Dentz
f5a5c95953
obexd: remove use of gobex in map module
...
gobex should not be use directly as it can interfere with ongoing
requests of the session.
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
c4b8c8adaf
obexd: remove use of gobex in pbap module
...
gobex should not be use directly as it can interfere with ongoing
requests of the session.
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
5e8a10df92
obexd: introduce obc_session_cancel
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
514cc9d0bb
obexd: introduce obc_session_delete
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
2e91048ed5
obexd: introduce obc_session_move
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
5c1c3c5d11
obexd: introduce obc_session_copy
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
aa38bd0529
obexd: introduce obc_session_mkdir
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
ed58b41924
obexd: introduce obc_session_setpath
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
5da12f4189
obexd: fix not queuing requests properly
...
OBEX does not support requests in parallel so they have to be queued
like in SendFiles.
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
65d9c7f8a5
obexd: remove unused field from obc_session
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
f427608f89
obexd: fix not checking session_request return
...
In case session_request return an error proceed to the next
2012-12-04 22:48:52 +01:00
Mikel Astiz
685ed406d0
obexd: Fix possible GLib assertion failure
...
In case of error there might be no io channel to shutdown.
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
4e4c8e2348
obexd: simplify handling of D-Bus pending calls in bluetooth.c
...
There is no much of point to have a user_data if it is always the same
type, besides this code is very inefficient and cause a lookup in the list
of pending calls everytime a reply is received.
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
bab4ca5f16
obexd: move bluetooth specific code from session.c to bluetooth.c
...
This simplifies session.c code quite a bit and enables supporting other
transports in the future.
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
8c97039f4e
obexd: add bluetooth transport driver
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
6a3f42a5bc
obexd: add support for transport drivers
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
3c51a36628
obexd: remove unused field
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
7aa89d5567
obexd: fix circular dependency of session and transfer
...
Currently the code has to to pass session to transfer via user data
(void *) only to be casted to session.
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
cb74e05c97
obexd: fix not being able to read apparams when transfer is complete
...
Transfer id/xfer is set to zero when it is completed which should not
prevent the profiles to read the apparam of the last response.
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
f435b5843e
obexd: fix parsing of apparam on pbap driver
...
Both hdr and size need to be updated otherwise no parameters will be
parsed.
2012-12-04 22:48:51 +01:00
Johan Hedberg
9b2277a879
obexd: map: Rename GetMessagesListing to GetMessageListing
2012-12-04 22:48:50 +01:00
Bartosz Szatkowski
7ee7a67ce0
obexd: Add support for PullMessagesListing in MAP client
...
Just basic functionality for now, returning whole listing as a string
(no parsing) and no apparams handling.
2012-12-04 22:48:50 +01:00
Bartosz Szatkowski
8b15cbab9f
obexd: Add basic support for MAP folder listing
...
For now just basic functionality - returning whole listing as a string
(no parsing for now) and no apparams handling.
2012-12-04 22:48:50 +01:00
Bartosz Szatkowski
76acb638b0
obexd: Add support for SetFolder in MAP client
2012-12-04 22:48:50 +01:00
Bartosz Szatkowski
9a9af3203b
obexd: Add basic support for MAP client in obex-client
2012-12-04 22:48:50 +01:00
Jaganath Kanakkassery
320dc79f0f
obexd: Fix file size issue in GetProperties
...
In SendFiles, If application calls GetProperties before
Request method returns then the file size is zero.
2012-12-04 22:48:49 +01:00
Bartosz Szatkowski
d6fdefe906
obexd: Fix app params memory management
2012-12-04 22:48:49 +01:00
Slawomir Bochenski
c0ad77f7e8
obexd: Fix crash on error in agent_request_reply
...
This fixes regression introduced by
63becff48820dc50a30ae495e286e858a886d9dd, causing obex-client to crash
in cases of e.g. remote site rejecting pushed file.
The req->function set by user of agent API may request agent object
deletion. This in turn checks if agent->pending is set and if it is,
it tries to cancel the pending call and frees pending call data. As at
this point we are already handling call response and we are going to
free this pending call data, agent->pending can be set to NULL prior to
calling req->function, thus preventing premature freeing of later
dereferenced req.
2012-12-04 22:48:46 +01:00
Slawomir Bochenski
9857369dc8
obexd: Fix missing format in call to g_error_new
2012-12-04 22:48:45 +01:00
Luiz Augusto von Dentz
230e706f80
obexd: Fix possible crash when indicating progress
...
The amount of transferred bytes should only be updated after it has
been sent.
2012-12-04 22:48:45 +01:00
Luiz Augusto von Dentz
9d1f970eb2
obexd: fix possible crash on GetFile
...
Invalid read of size 8
at 0x413DA1: get_file_callback (ftp.c:184)
by 0x40A74E: transfer_complete (gobex-transfer.c:73)
by 0x40AB91: transfer_response (gobex-transfer.c:172)
by 0x40847A: handle_response (gobex.c:629)
by 0x408C06: incoming_data (gobex.c:811)
by 0x3E01043DBC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.2910.0)
by 0x3E010445A7: ??? (in /lib64/libglib-2.0.so.0.2910.0)
by 0x3E01044AF4: g_main_loop_run (in /lib64/libglib-2.0.so.0.2910.0)
by 0x404CD4: main (main.c:102)
Address 0x8 is not stack'd, malloc'd or (recently) free'd
2012-12-04 22:48:44 +01:00
Johan Hedberg
081807736b
obexd: Remove g_obex_packet_find_header
...
This was exactly the same as g_obex_packet_get_header.
2012-12-04 22:48:44 +01:00
Luiz Augusto von Dentz
0e31d0f56b
obexd: port to gobex
...
This remove gwobex dependency of the client using gobex instead.
Based on initial work by Johan Hedberg <johan.hedberg@intel.com>
2012-12-04 22:48:43 +01:00
Luiz Augusto von Dentz
6b7b19c972
obexd: add FileTransfer.CopyFile implementation
2012-12-04 22:48:43 +01:00
Luiz Augusto von Dentz
501fa35265
obexd: add FileTransfer.MoveFile implementation
2012-12-04 22:48:43 +01:00
Luiz Augusto von Dentz
3fbffebe57
obexd: add sync target
...
sync target implements sync driver
2012-12-04 22:48:42 +01:00