Divya Yadav
d37fe0b4cc
obexd: Fix application parameter parsing in obex put
...
Fix for application parameter parsing which is missing
in obex put.
2012-12-04 22:48:55 +01:00
Luiz Augusto von Dentz
6d78da00e2
obexd: Remove unused public function
...
obex_io_error_quark is only used in session.c so can be static
2012-12-04 22:48:55 +01:00
Mikel Astiz
d381a6d934
obexd: free active transfer on session shutdown
...
The currently active request should be canceled just like any other
queued transfer. Otherwise obex timeout is reported.
2012-12-04 22:48:55 +01:00
Mikel Astiz
1eeaea6831
obexd: fix unreported canceled transfers
...
A session can be shut down from D-Bus, and therefore the pending
transfer callbacks must be reported.
2012-12-04 22:48:55 +01:00
Mikel Astiz
baa84b7232
obexd: fix canceling queued transfers
...
The Cancel() method in the D-Bus api should also abort queued transfers,
which should just be removed from the queue.
2012-12-04 22:48:55 +01:00
Mikel Astiz
19b460afbc
obexd: terminate queued transfers properly
...
Previous implementation of session_terminate_transfer assumed that the
transfer being terminated would always be the active one. However, it
should be possible to cancel any queued transfer using the D-Bus api.
2012-12-04 22:48:54 +01:00
Mikel Astiz
81cc887ccd
obexd: make sure callback does not match size
...
Otherwise it can be interpreted as successfully finished, which has its
own code path.
2012-12-04 22:48:54 +01:00
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
Luiz Augusto von Dentz
35e61613f5
obexd: map: Use ENOSYS to indicate not implemented function
2012-12-04 22:48:54 +01:00
Luiz Augusto von Dentz
81bdbef89e
obexd: Use ENOSYS to indicate not implemented function
2012-12-04 22:48:54 +01:00
Luiz Augusto von Dentz
93c9b5a56f
obexd: Use ENOSYS to indicate not implemented function
2012-12-04 22:48:54 +01:00
Luiz Augusto von Dentz
4c2a0c0da0
obexd: Use ENOSYS to indicate not implemented function
2012-12-04 22:48:54 +01:00
Luiz Augusto von Dentz
e57e3c4083
obexd: Make use of g_obex_errno_to_rsp to translate posix errors
2012-12-04 22:48:54 +01:00
Luiz Augusto von Dentz
f576cae0fb
obexd: Fix queueing packet containing error while suspended
...
Queueing the error won't remove the original packet created by transfer
from the queue so upon resume gobex will attempt to send it again.
To fix this we no longer create a error packet instead the session is
market as aborted and the error stored so when gobex finally resumes the
error is forward properly.
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
713ca9d9ce
obexd: Update record to support version 1.2 with GoepL2capPsm attribute
2012-12-04 22:48:53 +01:00
Luiz Augusto von Dentz
5955e79c28
obexd: Update record to support version 1.2 with GoepL2capPsm attribute
2012-12-04 22:48:53 +01:00
Luiz Augusto von Dentz
47f6ccd270
obexd: Add support for L2CAP transport
...
This uses driver port, if set (!= 0), as psm and export it in the service
record.
2012-12-04 22:48:53 +01:00
Luiz Augusto von Dentz
10092d19c7
obexd: Add port to service driver
...
This add possibility to optional port in addition to channel.
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
Jaganath Kanakkassery
533eb6f7e2
obexd: Fix length parameter of strncpy
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
Jaganath Kanakkassery
b5a360fbfa
obexd: Fix file not getting deleted when a push is aborted
...
Problem: Even if transfer is aborted file will be saved with partial
content.
Fix: In os_reset_session() os->cmd is checked for PUT before calling
driver->remove(), but os->cmd is never assigned.This fix sets os->cmd
wit respective opcode
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
5ffb0bb37f
obexd: Fix folder listing
...
parent-folder should indicates the existence of a parent folder which is
the opposit of what the code is currently doing.
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