Commits

Commit Message Author Age Changes
b782daeb obexd: Give transfer pointer in session callbacks Operations involving a transfer object will receive a pointer to such transfer in the callback. Note that the ownership of this object is not changed in any way, meaning that the session is still responsible for it. However this pointer can be useful during the execution of the callback, in order to access data members of the transfer. Mikel Astiz 13 years ago 9 files, +60, -33
2971a64f obexd: Wait for abort completion before Transfer.Cancel returns A new callback is given to g_obex_cancel_transfer() which will be called when abort completes and then only "Cancel" method reply will be sent to user Jaganath Kanakkassery 13 years ago 1 file, +42, -23
c342f70d obexd: Buffer-passing changes in transfer API Transfer API now takes const buffers (both params and contents) and internally copies the memory as necessary. This new API is safer to use, which is convenient if the modules would start using it directly. Mikel Astiz 13 years ago 3 files, +32, -38
fea2985b obexd: Transfer API splits create and register The transfer-creating functions (obc_transfer_get and obc_transfer_put) no longer register the transfer automatically. This separation makes it possible that the modules would create the transfers and then pass the object to the session, which would be responsible for the registration. Mikel Astiz 13 years ago 3 files, +25, -41
ec2a58fd obexd: Split internal obc_transfer_register() The creation process has been internally split into two steps: creation and D-Bus registration. This is easier to understand and it also allows to expose these two-steps in the transfer API. Mikel Astiz 13 years ago 1 file, +30, -25
cc648c10 obexd: Fix possible double free of params obc_transfer_get() and obc_transfer_put() should only assume ownership of the given params only in case of success. Otherwise some erros might result in a double free of such memory. Mikel Astiz 13 years ago 1 file, +5, -4
68d8b41e obexd: Add handler for SIGUSR2 This signal enables debug for obed so just do the same for obex-client Luiz Augusto von Dentz 13 years ago 1 file, +4, -0
f9efbe9f obexd: Use signalfd to handle unix signals Luiz Augusto von Dentz 13 years ago 1 file, +81, -10
55be67c6 obexd: Use signalfd to handle unix signals Writing anything to syslog in the signal handler can cause a deadlock with any ongoing syslog write. This is also aligned with what BlueZ and other projects has been doing. Luiz Augusto von Dentz 13 years ago 1 file, +78, -14
b248e814 obexd: Fix codying style Fix lines that are over 80 columns Luiz Augusto von Dentz 13 years ago 1 file, +18, -17
5c92e9b1 obexd: Remove transfer from queue before callback It is safer to remove the transfer from the internal queue (including session->p) before calling the transfer callback. This makes sure the callback will not manipulate the session in a way that the transfer is removed more than once. This was previously protected with session->p->id != 0 checks, but once the new callbacks have been adopted in session API, this logic can be removed. Mikel Astiz 13 years ago 1 file, +9, -11
c59cab53 obexd: Remove deprecated part of session API Once the modules are using the new callback style, the session API can be simplified and the old functions to access session->p removed. Mikel Astiz 13 years ago 2 files, +0, -43
6fb9a7a8 obexd: Use new session callback style in modules The session API now provides the transfer object in the callback, so the modules can directly access the transfer object. Mikel Astiz 13 years ago 5 files, +9, -9
907d414d obexd: Avoid GObex dependency from transfer.h This workaround makes it possible to include transfer.h from the modules, without adding a dependency to GObex. Mikel Astiz 13 years ago 2 files, +2, -2
05b22ad1 obexd: Fix possible memory leak on pbap module 16 bytes in 1 blocks are definitely lost in loss record 26 of 146 at 0x4A075B2: realloc (vg_replace_malloc.c:525) by 0x3B5104B76D: g_realloc (in /lib64/libglib-2.0.so.0.3000.2) by 0x3B51064A96: ??? (in /lib64/libglib-2.0.so.0.3000.2) by 0x3B51065156: g_string_insert_len (in /lib64/libglib-2.0.so.0.3000.2) by 0x3B510305BC: ??? (in /lib64/libglib-2.0.so.0.3000.2) by 0x3B51031BE7: g_build_filename (in /lib64/libglib-2.0.so.0.3000.2) by 0x416FEE: pbap_select (pbap.c:254) by 0x406CCE: process_message (object.c:224) by 0x3B5301D9A0: ??? (in /lib64/libdbus-1.so.3.5.6) by 0x3B5300F92F: dbus_connection_dispatch (in /lib64/libdbus-1.so.3.5.6) Luiz Augusto von Dentz 13 years ago 1 file, +1, -0
93615340 obexd: Return request id when generating a request in session API This is more consistent with other functions and allow the caller to cancel the request using obc_session_cancel. Luiz Augusto von Dentz 13 years ago 2 files, +18, -18
f41c43a6 obexd: Minor buffer access API changes Trivial changes in buffer getters in both session and transfer, regarding the access of transfer parameters: - const qualifiers added, to avoid unwanted frees - Buffers are now returned as void* instead of guint8* Mikel Astiz 13 years ago 5 files, +19, -20
1e9bca91 obexd: Emit TransferStarted signal only if stream start is success Even if obex_put_stream_start() fails TransferStarted signal will be emitted where as transfer start is actually failed. Jaganath Kanakkassery 13 years ago 1 file, +5, -2
4d0d6795 obexd: Fix not propagating GError in session API functions The errors should be properly forward to the caller and not just convert to generic error. Luiz Augusto von Dentz 13 years ago 9 files, +228, -136
0f4eb3e5 obexd: Remove file in case of error If the transfer operation is GET and it has not complete by the time its freed remove the file as its contents maybe corrupted/incomplete. Luiz Augusto von Dentz 13 years ago 1 file, +4, -0
0977754b obexd: open file during transfer creation This simplify the API a bit by not having to call obc_transfer_set_file to open the file. In addition to that split transfer creation/registration function so GET/PUT can have more specific logic and different paramenters. Luiz Augusto von Dentz 13 years ago 3 files, +162, -111
272ef020 obexd: transfers take gobex when starting gobex api should not be used by a transfer until it is started. This seems more explicit if the pointer is not passed during creation. Mikel Astiz 13 years ago 3 files, +13, -18
dd78f7c1 obexd: transfer api merges put and get A new enum type is used to distinguish put and get transfers. This is more convenient since it is done when registering the transfer, and not when it is actually started. The main benefits would be: - Some actions can be taken during creation, such as opening files. - session.c gets simplified. - The size of a put transfer can be exposed in D-Bus, while queued. - The transfer operation (put or get) can be exposed in D-Bus. None of these D-Bus changes are included in this patch. Mikel Astiz 13 years ago 3 files, +63, -62
f3636d08 obexd: remove unused field The errorcode field is set but never used, so it can safely be removed. In addition there is no need for such a field, because errors can be propagated using the available callback. Mikel Astiz 13 years ago 1 file, +3, -10
0cdd9bd0 obexd: Remove buffer based transfer Simplify the code by using temporary files and eliminates reallocations. Luiz Augusto von Dentz 13 years ago 9 files, +230, -239
942bfc96 obexd: Fix regression when calling obc_session_shutdown within callback Commit c07ddfbd019d3545cce2d7ec694143cdc55a2167 introduced the freeing of the active pending request on obc_session_shutdown without checking if the request was already processed/terminated. Luiz Augusto von Dentz 13 years ago 1 file, +3, -1
d4dff22a obexd: Remove glib-helper.h support Marcel Holtmann 13 years ago 6 files, +0, -35
a6be16b9 obexd: Mark filter strings const This structure is used for giving filters as input argument to messages_get_messages_listing(). There is no need for the string members to be modifiable in this context. And making them const plays well with map_ap_get_string(), from which the values of these members are going to be retrieved. The string pointers here are simply references to data held in map_ap_t *inparams. Slawomir Bochenski 13 years ago 1 file, +4, -4
6c120dcf obexd: Output parameters in folder listing reply This also introduces reusable any_get_next_header() that will be further utilised in other requests returning application parameters header. Slawomir Bochenski 13 years ago 1 file, +51, -0
832a725f obexd: Initial outgoing parameters support Slawomir Bochenski 13 years ago 1 file, +5, -0
3e48e937 obexd: Add implementation of map_ap_encode() Slawomir Bochenski 13 years ago 1 file, +89, -2
5b3d5a1a obexd: fix message-dummy.c build If g_slist_free_full is not supported by glib, build fails with error: plugins/messages.o: In function `get_folder_listing': /home/fdanis/src/obexd/plugins/messages.c:199: undefined reference to `g_slist_free_full' Frédéric Danis 13 years ago 1 file, +1, -0
d81f7887 obexd: map_ap: Fix whitespace errors Johan Hedberg 13 years ago 1 file, +0, -4
733df074 obexd: Use input parameters for folder listing Slawomir Bochenski 13 years ago 1 file, +8, -3
63be38a1 obexd: Add implementation for map_ap_get_* Slawomir Bochenski 13 years ago 1 file, +54, -4
6bac0ac4 obexd: Remove headers declared but not defined Syam Sidhardhan 13 years ago 1 file, +0, -4
0edc3756 obexd: Input parameters for GetMessagesListing This adds support for input application parameters header given in GetMessagesListing request. Slawomir Bochenski 13 years ago 1 file, +25, -2
99f60e79 obexd: Remove unused struct session_callback Syam Sidhardhan 13 years ago 1 file, +0, -5
6bf1fe65 obexd: Use goto for avoiding code duplication Syam Sidhardhan 13 years ago 1 file, +2, -2
0315434a obexd: Fix memory leak during session connect Syam Sidhardhan 13 years ago 1 file, +4, -1
73ba38a4 obexd: Output parameters for GetMessagesListing This sets the parameters returned from MAP backend for GetMessagesListing to be used in application parameters header sent in response. Slawomir Bochenski 13 years ago 1 file, +17, -0
b5d625fe obexd: Process incoming parameters in GET/PUT Slawomir Bochenski 13 years ago 1 file, +31, -0
9e8e5065 obexd: Add sorting of folder listing Slawomir Bochenski 13 years ago 1 file, +32, -0
9663c4e2 obexd: Code for returning folder listing Slawomir Bochenski 13 years ago 1 file, +22, -0
a09c8374 obexd: Actual code for folder listing retrieval Slawomir Bochenski 13 years ago 1 file, +62, -1
a6476549 obexd: simplify obc_session_pull Functions obc_session_get and obc_session_pull nearly share the same code, so the later can be achieved by just calling the first one. The session api is not modified in this patch. Mikel Astiz 13 years ago 1 file, +1, -21
687141b9 obexd: refactor naming convention in session api The terms "name", "filename" and "targetname" are used in session.h that can be confusing. This patch proposes to follow the terminology in the D-Bus api: - Name: the remote name of the object being transferred - Filename: the local filesystem name of a file being sent - Targetfile: the local filesystem name of a file being received Mikel Astiz 13 years ago 2 files, +20, -21
1fee4d92 obexd: fix naming convention in transfer api The terms can be quite misleading, so this patch proposes to follow the terminology in the D-Bus api: - Name: the remote name of the object being transferred - Filename: the name of the file in local the filesystem Both values can be NULL independently. This fixes the problem of using the terms differently in get and put operations. The result was that the properties "Name" and "Filename" were swapped in D-Bus in the case of get. Once the fields map to obex fields, the interpretation of the response from the agent becomes more complicated. Depending on the transfer type, either the name or the filename field must be updated. Mikel Astiz 13 years ago 2 files, +13, -10
e6814f9e obexd: Add basic logic for folder listing Slawomir Bochenski 13 years ago 1 file, +33, -0
81fb93fe obexd: Add stub for asynchronous folder listing Slawomir Bochenski 13 years ago 1 file, +40, -3
Previous Next