Age | Commit message (Collapse) | Author | Files | Lines |
|
Use plain int instead of gint. In glib gint is always a typedef to int,
so it's safe to use it even for callbacks with glib.
|
|
|
|
|
|
Rename the interface and move it to obexd-api.txt since it now belongs
to the same daemon.
|
|
This reverts commit 8a03376544b046a84301847d1594f6c3674983ff.
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.
|
|
As per OBEX spec the NAME header should not contain absolute paths
|
|
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)
|
|
By passing directly the reference to GObexApparam it is no longer
necessary to use intermediate buffers to pass data around.
|
|
|
|
SetFormat, SetOrder, SetFilter and GetFilter methods are no longer
necessary as other methods now take them as parameters to avoid round
trips.
|
|
This avoid D-Bus round trips and is more aligned with what has been
proposed for MessageAccess interface.
|
|
This avoid D-Bus round trips and is more aligned with what has been
proposed for MessageAccess interface.
|
|
This avoid D-Bus round trips and is more aligned with what has been
proposed for MessageAccess interface.
|
|
|
|
pbap_select has to use absolute path with known location to support
repeatable pbap_select calls. In other way the second call fails.
|
|
Values stored are never read.
|
|
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.
|
|
In addition use define so it is easier to change this in future
|
|
|
|
Return the D-Bus path of the transfer representing the operation.
|
|
Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
|
|
With these macro helpers we can separate in/out arguments and use their
own vector.
|
|
Constify method tables with the following command:
find . -name '*.[ch]' -exec \
sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
|
|
The maximum amount needed is known and sufficiently small to be in the
stack which is much simpler to deal with.
|
|
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.
|
|
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.
|
|
The session API now provides the transfer object in the callback, so
the modules can directly access the transfer object.
|
|
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.
|
|
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*
|
|
The errors should be properly forward to the caller and not just convert
to generic error.
|
|
Simplify the code by using temporary files and eliminates reallocations.
|
|
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)
|
|
Previous implementation reported busy when trying to queue several
operations in the same session.
|
|
If the same path is selected twice, the operation can be skipped but the
D-Bus response should still be sent.
|
|
Previous statement always returned success.
|
|
gobex should not be use directly as it can interfere with ongoing
requests of the session.
|
|
Currently the code has to to pass session to transfer via user data
(void *) only to be casted to session.
|
|
Both hdr and size need to be updated otherwise no parameters will be
parsed.
|
|
This remove gwobex dependency of the client using gobex instead.
Based on initial work by Johan Hedberg <johan.hedberg@intel.com>
|
|
pbap target implements phonebook access driver
|
|
This should indicate more clearer which function are public to the
drivers.
|
|
This simplify target matching to a single place making it easier to add
new targets/profiles.
Matching is done by either friendly name e.g. opp, ftp... or Bluetooth
UUID.
Drivers are probed when a session is established and removed when the
session is destroyed.
|
|
This make it easier to modularize obex-client
|
|
Session data should not be acessible directly otherwise it cause too
much dependency by profile specific code which is quite inefficient in
the long term.
|
|
|
|
This patch fixes gcc warnings for "format not a string literal and no
format arguments".
|
|
Error message were most of the time empty.
Thanks for Vitja Makarov <vitja.makarov@gmail.com> for reporting this.
|