OSDN Git Service
Srinivasa Ragavan [Thu, 4 Oct 2012 14:22:37 +0000 (19:52 +0530)]
obexd: Update the file offset to the beginning after writing to the file
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.
Luiz Augusto von Dentz [Tue, 2 Oct 2012 08:20:23 +0000 (11:20 +0300)]
obexd: Make obc_transfer_put to accept NULL as filename
In that case contents should be valid so the modules can use
obc_transfer_put to create temporary files.
Luiz Augusto von Dentz [Wed, 12 Sep 2012 11:28:31 +0000 (14:28 +0300)]
obexd: Avoid extra copies while passing apparam to transfer
By passing directly the reference to GObexApparam it is no longer
necessary to use intermediate buffers to pass data around.
Luiz Augusto von Dentz [Tue, 11 Sep 2012 19:23:34 +0000 (22:23 +0300)]
obexd: Fix not sending parameters to get message in map module
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.
Luiz Augusto von Dentz [Fri, 7 Sep 2012 12:28:49 +0000 (15:28 +0300)]
obexd: Add MessageAccess.ListFilterFields
Luiz Augusto von Dentz [Tue, 28 Aug 2012 10:05:35 +0000 (13:05 +0300)]
obexd: Rename MessageAccess method GetMessagesListing to ListMessages
In addition to that add missing parsing of the filters
Luiz Augusto von Dentz [Mon, 27 Aug 2012 08:13:49 +0000 (11:13 +0300)]
obexd: Rename MessageAccess method GetFolderListing to ListFolders
In addition to that add missing parsing of the filters.
Luiz Augusto von Dentz [Mon, 10 Sep 2012 08:30:31 +0000 (11:30 +0300)]
obexd: Use larger timeout first packet in transfers
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.
Luiz Augusto von Dentz [Fri, 14 Sep 2012 10:15:10 +0000 (13:15 +0300)]
obexd: Unify callbacks for operations that only report status
This removes duplicated code.
Sunil Kumar Behera [Thu, 13 Sep 2012 13:44:24 +0000 (19:14 +0530)]
obexd: Add set delete status function
This function will inform MAP server to modify
the delete status of a given message.
Sunil Kumar Behera [Thu, 13 Sep 2012 13:43:28 +0000 (19:13 +0530)]
obexd: Add set read status function
This function will inform MAP server to modify the
read status of a given message.
Sunil Kumar Behera [Thu, 13 Sep 2012 13:42:25 +0000 (19:12 +0530)]
obexd: Add support for MessageStatus
Add driver to support x-bt/messageStatus mimetype
Luiz Augusto von Dentz [Mon, 10 Sep 2012 08:02:58 +0000 (11:02 +0300)]
obexd: Move common code to pull_phonebook
Luiz Augusto von Dentz [Mon, 10 Sep 2012 08:02:56 +0000 (11:02 +0300)]
obexd: Remove deprecated methods from PhonebookAccess
SetFormat, SetOrder, SetFilter and GetFilter methods are no longer
necessary as other methods now take them as parameters to avoid round
trips.
Luiz Augusto von Dentz [Mon, 10 Sep 2012 08:02:55 +0000 (11:02 +0300)]
obexd: Add filters to PhonebookAccess.List and PhonebookAccess.Search
This avoid D-Bus round trips and is more aligned with what has been
proposed for MessageAccess interface.
Luiz Augusto von Dentz [Mon, 10 Sep 2012 08:02:54 +0000 (11:02 +0300)]
obexd: Add filters to PhonebookAccess.Pull
This avoid D-Bus round trips and is more aligned with what has been
proposed for MessageAccess interface.
Luiz Augusto von Dentz [Mon, 10 Sep 2012 08:02:53 +0000 (11:02 +0300)]
obexd: Add filters to Phonebook.PullAll
This avoid D-Bus round trips and is more aligned with what has been
proposed for MessageAccess interface.
Srinivasa Ragavan [Wed, 29 Aug 2012 05:15:03 +0000 (10:45 +0530)]
obexd: Fix crash on map module
gboolean is expected to hold 0/1. But it is holding int return from
strcasecmp which crashes DBusMessage at:
_dbus_return_val_if_fail (*bool_p == 0 || *bool_p == 1, FALSE);
Trace:
0 0x00007ffff7328d95 in __GI_raise (sig=6) at raise.c:64
1 0x00007ffff732a2ab in __GI_abort () at abort.c:93
2 0x00007ffff78d0655 in _dbus_abort () at dbus-sysdeps.c:94
3 0x00007ffff78c75f1 in _dbus_warn_check_failed at dbus-internals.c:289
4 0x00007ffff78ba28b in dbus_message_iter_append_basic at dbus-message.c:2538
5 0x00000000004201c3 in append_variant at client/dbus.c:44
6 0x000000000042024e in obex_dbus_dict_append at client/dbus.c:65
7 0x000000000041dcc9 in parse_read at client/map.c:423
8 0x000000000041dfa7 in msg_element at client/map.c:518
9 0x00007ffff7b323b9 in emit_start_element at gmarkup.c:986
10 0x00007ffff7b33b44 in g_markup_parse_context_parse at gmarkup.c:1323
11 0x000000000041e1ad in message_listing_cb at client/map.c:586
12 0x000000000041744c in session_terminate_transfer client/session.c:743
13 0x00000000004174d7 in session_notify_complete at client/session.c:758
14 0x000000000041755a in transfer_complete at client/session.c:778
15 0x000000000041f57b in xfer_complete at client/transfer.c:521
16 0x000000000040efdf in transfer_complete at gobex/gobex-transfer.c:102
17 0x000000000040f418 in transfer_response at gobex/gobex-transfer.c:221
18 0x000000000040b320 in handle_response at gobex/gobex.c:948
19 0x000000000040bbc1 in incoming_data at gobex/gobex.c:1191
20 0x00007ffff7b2f94a in g_main_dispatch (context=0x62f130) at gmain.c:2515
21 g_main_context_dispatch (context=0x62f130) at gmain.c:3052
22 0x00007ffff7b2fd10 in g_main_context_iterate at gmain.c:3123
23 g_main_context_iterate at gmain.c:3060
24 0x00007ffff7b3010a in g_main_loop_run (loop=0x62e1b0) at gmain.c:3317
25 0x000000000041527d in main at client/main.c:175
Syam Sidhardhan [Wed, 22 Aug 2012 16:35:54 +0000 (22:05 +0530)]
obexd: Remove redundant include errno.h
Syam Sidhardhan [Wed, 22 Aug 2012 16:35:53 +0000 (22:05 +0530)]
obexd: Remove redundant include sys/stat.h
Sunil Kumar Behera [Fri, 17 Aug 2012 15:08:17 +0000 (20:38 +0530)]
obexd: Add subject length parameter in GetMessageListing
Add subject length parameter to allow MAP server to
create subject as per MAP client length preference.
Sunil Kumar Behera [Fri, 17 Aug 2012 15:06:41 +0000 (20:36 +0530)]
obexd: Add offset parameter decription
Add offset parameter description for
messages_get_messages_listing() function header
Sunil Kumar Behera [Fri, 17 Aug 2012 09:33:46 +0000 (15:03 +0530)]
obexd: Fix invalid oflag check
Change logic to check for O_WRONLY, as oflag is
created by an OR operation of O_WRONLY, O_CREAT and
O_TRUNC.
Message update is a PUT function, this check returns
bad response if GET is received.
Luiz Augusto von Dentz [Thu, 9 Aug 2012 10:32:33 +0000 (13:32 +0300)]
obexd: Remove map_ap.c
It is no longer needed as MAP plugin is now using GObexApparam API
Luiz Augusto von Dentz [Thu, 9 Aug 2012 10:32:32 +0000 (13:32 +0300)]
obexd: Make use of GObexApparam API
Luiz Augusto von Dentz [Thu, 9 Aug 2012 10:32:31 +0000 (13:32 +0300)]
obexd: Make use of GObexApparam API
Luiz Augusto von Dentz [Thu, 9 Aug 2012 10:32:30 +0000 (13:32 +0300)]
obexd: Port PBAP module to use GObexApparam
Ludek Finstrle [Thu, 9 Aug 2012 16:07:33 +0000 (18:07 +0200)]
obexd: Fix pbap_select using absolute path with known locations
pbap_select has to use absolute path with known location to support
repeatable pbap_select calls. In other way the second call fails.
Luiz Augusto von Dentz [Thu, 9 Aug 2012 10:47:55 +0000 (13:47 +0300)]
obexd: Fix possible memory leak in handling of location
path was not being freed before returning, the is also simplified so
the error is now given in the return of the function.
Luiz Augusto von Dentz [Tue, 7 Aug 2012 13:26:38 +0000 (16:26 +0300)]
obexd: Fix possible memory leak in bluetooth driver
2,210 (64 direct, 2,146 indirect) bytes in 2 blocks are definitely lost in loss record 150 of 155
at 0x4A0884D: malloc (vg_replace_malloc.c:263)
by 0x3B2900F8A1: sdp_create (sdp.c:3656)
by 0x3B2900FAE0: sdp_connect (sdp.c:4604)
by 0x415902: adapter_reply (bluetooth.c:421)
by 0x3B22C0C429: ??? (in /usr/lib64/libdbus-1.so.3.5.6)
by 0x3B22C0F5E9: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.5.6)
by 0x4059A7: message_dispatch (mainloop.c:76)
by 0x32CD64822A: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x32CD647694: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x32CD6479C7: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x32CD647DC1: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x40567F: main (main.c:175)
Luiz Augusto von Dentz [Fri, 27 Jul 2012 14:56:57 +0000 (17:56 +0300)]
obexd: Make handle of location more clear
Add proper defines for supported paths and convert relative
path absolute to align with PBAP paths.
Harald Schmitt [Wed, 18 Jul 2012 14:53:08 +0000 (16:53 +0200)]
obexd: phonebook: Replace magic strings for phonebook names and folders
Harald Schmitt [Wed, 18 Jul 2012 14:53:07 +0000 (16:53 +0200)]
obexd: Fix phonebook contacts query
At the moment IRMC fails to connect for phonebook_ebook and
phonebook_tracker usage because the name parameter for phonebook_pull
is not an absolute path.
Luiz Augusto von Dentz [Tue, 3 Jul 2012 18:28:13 +0000 (21:28 +0300)]
obexd: Add Message.Get implementation
Luiz Augusto von Dentz [Tue, 3 Jul 2012 18:28:11 +0000 (21:28 +0300)]
obexd: Use filter instead of dummy as argument name in MAP
This is aligned with the documentation that uses filter as well.
Luiz Augusto von Dentz [Tue, 3 Jul 2012 18:28:08 +0000 (21:28 +0300)]
obexd: Change MessageAccess.GetMessageListing to not return raw xml
This parses the response and return as a list of dictionary where each
entry is a message and its properties,
Luiz Augusto von Dentz [Tue, 3 Jul 2012 18:28:05 +0000 (21:28 +0300)]
obexd: Change MessageAccess.GetFolderListing to not return raw xml
This parses the response and return as a list of dictionary where each
entry is a folder and its properties, similar to what
FileTransfer.ListFolder does.
Luiz Augusto von Dentz [Wed, 20 Jun 2012 10:51:32 +0000 (13:51 +0300)]
obexd: Fix wrong signature of MessageAccess.SetFolder
D-Bus string signature is 's' not 'string'
Szymon Janc [Wed, 13 Jun 2012 20:49:23 +0000 (22:49 +0200)]
obexd: Fix some common spelling errors
Fix spelling errors reported by codespell.
Szymon Janc [Wed, 13 Jun 2012 20:49:21 +0000 (22:49 +0200)]
obexd: Fix dead assignments
Values stored are never read.
Szymon Janc [Wed, 13 Jun 2012 20:49:19 +0000 (22:49 +0200)]
obexd: Fix error returning in obc_transfer_put
Always set error on failure in obc_transfer_put. This is expected by
callers and will avoid possible NULL pointer dereference.
Also fix improper use of errno variable (calling error may modify it)
and some dead assignments to perr.
Szymon Janc [Wed, 13 Jun 2012 20:49:18 +0000 (22:49 +0200)]
obexd: Use g_malloc0 in get_filter_strs
Use g_malloc0 instead of g_try_malloc0 to allocate list. All users
expects to get valid pointer from it anyway. Also size of allocated
memory is small.
Szymon Janc [Wed, 13 Jun 2012 20:49:17 +0000 (22:49 +0200)]
obexd: Fix use of uninitialized count variable
If opendir() call fails count would be passed to callback
uninitialized.
Luiz Augusto von Dentz [Wed, 13 Jun 2012 08:31:51 +0000 (11:31 +0300)]
obexd: Fix memory leak in bluetooth driver
384 (184 direct, 200 indirect) bytes in 1 blocks are definitely lost in loss record 141 of 157
at 0x4A0884D: malloc (vg_replace_malloc.c:263)
by 0x392E217815: ??? (in /usr/lib64/libdbus-1.so.3.5.6)
by 0x392E218632: dbus_message_new_method_call (in /usr/lib64/libdbus-1.so.3.5.6)
by 0x413AD3: send_method_call (bluetooth.c:87)
by 0x414933: manager_reply (bluetooth.c:496)
by 0x392E20C429: ??? (in /usr/lib64/libdbus-1.so.3.5.6)
by 0x392E20F5E9: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.5.6)
by 0x405767: message_dispatch (mainloop.c:76)
by 0x369E04827A: ??? (in /usr/lib64/libglib-2.0.so.0.3200.3)
by 0x369E0476E4: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.3)
by 0x369E047A17: ??? (in /usr/lib64/libglib-2.0.so.0.3200.3)
by 0x369E047E11: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.3)
Mikel Astiz [Tue, 12 Jun 2012 12:10:26 +0000 (14:10 +0200)]
obexd: Fix cancellation of queued transfers
Cancelling queued (not started yet) transfers should not fail. Instead,
they must be removed from the queue, so we just need to call the
transfer callback.
Mikel Astiz [Tue, 12 Jun 2012 12:10:25 +0000 (14:10 +0200)]
obexd: Remove obc_transfer_abort
Refactor the code to remove function obc_transfer_abort, which is used
only once and is anyway coupled to the D-Bus API.
Mikel Astiz [Tue, 12 Jun 2012 12:10:24 +0000 (14:10 +0200)]
obexd: Fix possible unreplied D-Bus message
If a previous cancel request is in progress, a second cancel request
should fail.
This by the way fixes unreplied D-Bus messages.
Luiz Augusto von Dentz [Mon, 11 Jun 2012 10:30:39 +0000 (13:30 +0300)]
obexd: Fix using org.openobex.Error
In addition use define so it is easier to change this in future
Luiz Augusto von Dentz [Thu, 7 Jun 2012 08:31:13 +0000 (11:31 +0300)]
obexd: Use session path as prefix for transfer path
This should make it easier to identify to which session the transfer
belongs.
Luiz Augusto von Dentz [Thu, 7 Jun 2012 08:31:12 +0000 (11:31 +0300)]
obexd: Fix not using connection passed to obc_transfer_register
Make use of the connection parameter instead of assuming the connection
will always be to the session bus.
Luiz Augusto von Dentz [Fri, 1 Jun 2012 11:08:01 +0000 (14:08 +0300)]
obexd: Rename Transfer interface to org.bluez.obex.Transfer
Luiz Augusto von Dentz [Fri, 1 Jun 2012 10:40:11 +0000 (13:40 +0300)]
obexd: Rename MessageAccess interface to org.bluez.obex.MessageAccess
Luiz Augusto von Dentz [Fri, 1 Jun 2012 10:39:20 +0000 (13:39 +0300)]
obexd: Rename Synchronization interface to org.bluez.obex.Synchronization
Luiz Augusto von Dentz [Fri, 1 Jun 2012 10:37:50 +0000 (13:37 +0300)]
obexd: Rename PhonebookAccess interface to org.bluez.obex.PhonebookAccess
Luiz Augusto von Dentz [Fri, 1 Jun 2012 10:36:09 +0000 (13:36 +0300)]
obexd: Rename FileTransfer interface to org.bluez.obex.FileTransfer
Luiz Augusto von Dentz [Fri, 1 Jun 2012 10:33:09 +0000 (13:33 +0300)]
obexd: Rename ObjectPush interface to org.bluez.obex.ObjectPush
Luiz Augusto von Dentz [Fri, 1 Jun 2012 10:27:44 +0000 (13:27 +0300)]
obexd: Rename session interface to org.bluez.obex.Session
The base is also changed to /org/bluez/obex to follow the new namespace
Luiz Augusto von Dentz [Fri, 1 Jun 2012 10:23:36 +0000 (13:23 +0300)]
obexd: Change namespace to org.bluez.obex.client
Luiz Augusto von Dentz [Wed, 23 May 2012 12:20:40 +0000 (15:20 +0300)]
obexd: Change agent interface to org.bluez.obex.Agent
Luiz Augusto von Dentz [Wed, 23 May 2012 10:53:06 +0000 (13:53 +0300)]
obexd: Change D-Bus namespace to org.bluez.obex
This changes the namespace from org.openobex to org.bluez.obex
Mikel Astiz [Mon, 4 Jun 2012 09:37:58 +0000 (11:37 +0200)]
obexd: Update copyright statement
Mikel Astiz [Mon, 4 Jun 2012 09:37:54 +0000 (11:37 +0200)]
obexd: PhonebookAccess sessions return transfers
Return the D-Bus path of the transfer representing the operation.
Mikel Astiz [Mon, 4 Jun 2012 09:37:52 +0000 (11:37 +0200)]
obexd: Synchronization sessions return transfers
Return the D-Bus path of the transfer representing the operation.
Mikel Astiz [Mon, 4 Jun 2012 09:37:50 +0000 (11:37 +0200)]
obexd: FileTransfer sessions return transfers
Return the D-Bus path of the transfer representing the operation.
Mikel Astiz [Mon, 4 Jun 2012 09:37:48 +0000 (11:37 +0200)]
obexd: ObjectPush sessions return transfers
Return the D-Bus path of the transfer representing the operation.
Mikel Astiz [Mon, 4 Jun 2012 09:37:47 +0000 (11:37 +0200)]
obexd: Expose D-Bus data in internal transfer API
Expose in transfer API the D-Bus path and properties as should be
returned by transfer-initiating D-Bus methods.
Mikel Astiz [Mon, 4 Jun 2012 09:37:46 +0000 (11:37 +0200)]
obexd: Support empty filename in obc_transfer_get
Passing an empty string as a filename for obc_transfer_get will be
similar to passing a NULL filename. This means a temporary file will be
created to store the content of the transfer.
NULL and "" are not exactly equivalent though: in case of NULL the file
will be automatically removed immediately after being open, which means
that the transfer initiator should also open the file to prevent it from
being removed (to be used from the modules). In this case, the filename
will not be exposed in D-Bus.
On the other hand, if "" is given, the file will be removed only in case
of error. So after success the transfer initiator should decide whether
the file should be removed or not.
This change is convenient in order to expose the same API in D-Bus.
Mikel Astiz [Mon, 4 Jun 2012 09:37:44 +0000 (11:37 +0200)]
obexd: Make transfer filename optional
The property might not exist for certain transfers, typically when they
have been initiated internally.
Mikel Astiz [Wed, 30 May 2012 15:50:22 +0000 (17:50 +0200)]
obexd: Make FileTransfer.PutFile asynchronous
There is no reason to have inconsistent behavior between GetFile and
PutFile, in FileTransfer D-Bus API.
Before this change, PutFile reported success immediately after queueing
the transfer, even though the D-Bus signature includes the async flag.
Mikel Astiz [Wed, 30 May 2012 15:50:21 +0000 (17:50 +0200)]
obexd: Expose all transfers in D-Bus
Relying on a internal policy (based on transfer type) to decide if a
transfer should be exposed or not in D-Bus has some limitations. The
simplest possible alternative to this is to expose all transfers in
D-Bus, assuming the overhead is not significant.
Mikel Astiz [Wed, 30 May 2012 15:50:20 +0000 (17:50 +0200)]
obexd: Remove obsolete authentication code
After the removal of the agent, the implementation of the session can be
simplified by removing all authentication-related code.
Mikel Astiz [Wed, 30 May 2012 15:50:19 +0000 (17:50 +0200)]
obexd: Remove internal transfer progress report
The new D-Bus API uses signals to report the progress updates, so the
internal progress callback is not needed any more.
Mikel Astiz [Wed, 30 May 2012 15:50:18 +0000 (17:50 +0200)]
obexd: Remove unused functions in transfer API
After the removal of the agent these functions are not useful any more.
Mikel Astiz [Wed, 30 May 2012 15:50:17 +0000 (17:50 +0200)]
obexd: Remove D-Bus agent
The authorization mechanism is entirely removed from the session, and
thus transfers are automatically started (once popped from the queue)
without confirmation and without any name/filename change.
Mikel Astiz [Wed, 30 May 2012 15:50:16 +0000 (17:50 +0200)]
obexd: Use transfer owner instead of agent
The security checks in the transfers' D-Bus API will consider check for
the transfer owner's path (session owner) instead of the agent path.
Mikel Astiz [Wed, 30 May 2012 15:50:14 +0000 (17:50 +0200)]
obexd: Add transfer event-reporting signals
These signals replace the old agent-based notification mechanism.
Mikel Astiz [Wed, 30 May 2012 15:50:12 +0000 (17:50 +0200)]
obexd: Add progress property to transfer
The number of transferred bytes is exposed in D-Bus using a specific
property for this purpose.
Internally, the value of this property does not necessarily match the
internal progress counter. In order to avoid D-Bus overhead, the
property will be updated once per second.
Mikel Astiz [Wed, 30 May 2012 15:50:10 +0000 (17:50 +0200)]
obexd: Add D-Bus helper library
No functionality changes. This is just about avoiding duplicated code.
Mikel Astiz [Mon, 21 May 2012 09:07:13 +0000 (11:07 +0200)]
obexd: Replace parameter dict with conventional ones
Mikel Astiz [Mon, 21 May 2012 09:07:11 +0000 (11:07 +0200)]
obexd: Move GetCapabilities to session API
Mikel Astiz [Mon, 21 May 2012 09:07:08 +0000 (11:07 +0200)]
obexd: Replace SendFiles with SendFile
The function is now asynchronous, since it will return only when the
transfer has been finished.
Mikel Astiz [Mon, 21 May 2012 09:07:05 +0000 (11:07 +0200)]
obexd: Wrap OPP into specific session type
Mikel Astiz [Mon, 21 May 2012 09:07:04 +0000 (11:07 +0200)]
obexd: Use constant instead of NULL variable
The filename will always be NULL for capability-requesting sessions, so
it doesn't make much sense to use such field.
Paul Seidler [Mon, 21 May 2012 14:59:27 +0000 (16:59 +0200)]
obexd: Remove left over glib-helper.h support
Mikel Astiz [Fri, 18 May 2012 07:54:04 +0000 (09:54 +0200)]
obexd: Simplify error-handling code
Refactor error-handling code to avoid duplicated code.
Mikel Astiz [Fri, 18 May 2012 07:54:03 +0000 (09:54 +0200)]
obexd: Fix NULL dereference in case of error
obc_session_queue assumes that the given transfer is not NULL, so this
must be checked explicitly.
Lucas De Marchi [Fri, 18 May 2012 18:32:04 +0000 (15:32 -0300)]
obexd: Do not set signature and reply in GDBus tables
Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
Lucas De Marchi [Fri, 18 May 2012 18:32:01 +0000 (15:32 -0300)]
obexd: Convert GDBus methods to use macro helpers
With these macro helpers we can separate in/out arguments and use their
own vector.
Marcel Holtmann [Fri, 18 May 2012 03:34:51 +0000 (20:34 -0700)]
obexd: Constify GDBus signal tables
Constify signal tables with the following command:
find . -name '*.[ch]' -exec \
sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;
Marcel Holtmann [Fri, 18 May 2012 03:34:07 +0000 (20:34 -0700)]
obexd: Constify GDBus method tables
Constify method tables with the following command:
find . -name '*.[ch]' -exec \
sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
Luiz Augusto von Dentz [Tue, 15 May 2012 16:16:46 +0000 (19:16 +0300)]
obexd: Fix not checking if GoepL2capPsm contains a valid PSM
In case the PSM is not valid ignore it so we are still able to connect
to RFCOMM.
Luiz Augusto von Dentz [Tue, 15 May 2012 16:16:45 +0000 (19:16 +0300)]
obexd: Fix not setting port to 0 when listen fails
With some only kernels auto assigning psm seem to fail, leaving the psm
with wrong value:
obexd[2930]: plugins/bluetooth.c:start() listening on channel 9
obexd[2930]: bluetooth: unable to listen in psm 65535
obexd[2930]: plugins/bluetooth.c:start() listening on channel 10
obexd[2930]: bluetooth: unable to listen in psm 65535
Luiz Augusto von Dentz [Mon, 14 May 2012 13:46:01 +0000 (16:46 +0300)]
obexd: Use stack memory for application parameters in pbap module
The maximum amount needed is known and sufficiently small to be in the
stack which is much simpler to deal with.
Luiz Augusto von Dentz [Mon, 14 May 2012 10:06:07 +0000 (13:06 +0300)]
obexd: Add obc_transfer_set_params to set application parameters
The parameters are optional and only used in a few occasions so it
doesn't make sense to have that directly in obc_transfer_get and
obc_transfer_put.
Mikel Astiz [Fri, 4 May 2012 12:39:38 +0000 (14:39 +0200)]
obexd: Create transfers in modules
After this patch the modules are responsible for creating the transfers,
and these objects must be queued using the session API.
This way the transfer initiator has full access to the transfer object,
in case for example it wants to access some member variable.
Mikel Astiz [Fri, 4 May 2012 12:39:37 +0000 (14:39 +0200)]
obexd: Flip parameter order in transfer API
This minor change makes the transfer API more consistent with the
parameter-order used in the session API.
Mikel Astiz [Fri, 4 May 2012 12:39:36 +0000 (14:39 +0200)]
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 [Fri, 4 May 2012 12:39:35 +0000 (14:39 +0200)]
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 [Fri, 4 May 2012 12:39:34 +0000 (14:39 +0200)]
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 [Fri, 4 May 2012 12:39:33 +0000 (14:39 +0200)]
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.