Luiz Augusto von Dentz
68d8b41ec2
obexd: Add handler for SIGUSR2
...
This signal enables debug for obed so just do the same for obex-client
2012-12-04 22:48:58 +01:00
Luiz Augusto von Dentz
f9efbe9f80
obexd: Use signalfd to handle unix signals
2012-12-04 22:48:58 +01:00
Luiz Augusto von Dentz
b248e814f2
obexd: Fix codying style
...
Fix lines that are over 80 columns
2012-12-04 22:48:58 +01:00
Jaganath Kanakkassery
2971a64fa7
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
2012-12-04 22:48:58 +01:00
Mikel Astiz
5c92e9b1cc
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.
2012-12-04 22:48:58 +01:00
Mikel Astiz
c59cab5341
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.
2012-12-04 22:48:58 +01:00
Mikel Astiz
6fb9a7a84b
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.
2012-12-04 22:48:58 +01:00
Mikel Astiz
b782daebcd
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.
2012-12-04 22:48:58 +01:00
Mikel Astiz
907d414d26
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.
2012-12-04 22:48:58 +01:00
Mikel Astiz
f41c43a6e5
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*
2012-12-04 22:48:57 +01:00
Luiz Augusto von Dentz
936153406b
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.
2012-12-04 22:48:57 +01:00
Luiz Augusto von Dentz
4d0d679535
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.
2012-12-04 22:48:57 +01:00
Luiz Augusto von Dentz
0f4eb3e5ce
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.
2012-12-04 22:48:57 +01:00
Luiz Augusto von Dentz
0977754be8
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.
2012-12-04 22:48:57 +01:00
Mikel Astiz
272ef02090
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.
2012-12-04 22:48:57 +01:00
Mikel Astiz
dd78f7c165
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.
2012-12-04 22:48:57 +01:00
Mikel Astiz
f3636d08a1
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.
2012-12-04 22:48:57 +01:00
Luiz Augusto von Dentz
0cdd9bd069
obexd: Remove buffer based transfer
...
Simplify the code by using temporary files and eliminates reallocations.
2012-12-04 22:48:57 +01:00
Luiz Augusto von Dentz
05b22ad10b
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)
2012-12-04 22:48:57 +01:00
Luiz Augusto von Dentz
942bfc969d
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.
2012-12-04 22:48:57 +01:00
Syam Sidhardhan
99f60e7937
obexd: Remove unused struct session_callback
2012-12-04 22:48:56 +01:00
Syam Sidhardhan
0315434a0e
obexd: Fix memory leak during session connect
2012-12-04 22:48:56 +01:00
Mikel Astiz
a64765498f
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.
2012-12-04 22:48:55 +01:00
Mikel Astiz
687141b979
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
2012-12-04 22:48:55 +01:00
Mikel Astiz
1fee4d9205
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.
2012-12-04 22:48:55 +01:00
Mikel Astiz
84d105d8e0
obexd: add obc_transfer_set_filename
...
This is just a setter for the filename field in transfers.
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
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
Luiz Augusto von Dentz
e976fc0a57
obexd: add pbap target
...
pbap target implements phonebook access driver
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
044d002f1f
obexd: add ftp target
...
ftp target implements file transfer and Nokia Pc Suite drivers.
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
9e64065e4f
obexd: add opp target
...
opp target implements object push driver
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
29eb13b108
obexd: make use of obc_ prefix for public functions
...
This should indicate more clearer which function are public to the
drivers.
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
590fd450bb
obexd: add target driver support
...
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.
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
ec0e7836cf
obexd: move __obex_log_init before manager_init
...
This enables us to log target during initialization
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
7605e6c809
obexd: add target module vtable
...
New targets/profiles can be introduced by just adding an entry to the
table and register their drivers similarly to a plugin.
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
c3dee209a0
obexd: separate manager interface code from main
...
Move manager interface code to it own file.
2012-12-04 22:48:41 +01:00
Luiz Augusto von Dentz
22c7e9f390
obexd: separate agent code from session
...
This should improve modularization of code
2012-12-04 22:48:41 +01:00
Luiz Augusto von Dentz
fd15f3a28a
obexd: separate ftp code from session
...
This should improve modularization of code
2012-12-04 22:48:41 +01:00
Luiz Augusto von Dentz
b5c28914a1
obexd: make transfer structure private
...
This make it easier to modularize obex-client
2012-12-04 22:48:41 +01:00
Luiz Augusto von Dentz
d06d20882a
obexd: make session structure private
...
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.
2012-12-04 22:48:41 +01:00
Dmitriy Paliy
b17209a9b4
obexd: Add adapter ReleaseSession to obex-client
...
Release of adapter session is added to obex-client when closing OBEX
transfer.
2012-12-04 22:48:39 +01:00
Dmitriy Paliy
821da85bb6
obexd: Add handling of system D-Bus method calls
...
Sending system D-Bus method calls (DefaultAdapter, FindAdapter
and RequestSession) and handling of pending D-Bus calls is added
to obex-client.
2012-12-04 22:48:39 +01:00
Dmitriy Paliy
d89ad62c05
obexd: Split up session_create in separate functions
...
Connection of RFCOMM and SDP are extracted from session_create function
into session_connect. Such allows making asynchronous calls before
creating connections.
2012-12-04 22:48:39 +01:00
Dmitriy Paliy
bbcc0f34da
obexd: Add system bus connection in obex-client
...
Connection to system bus is added in obex-client. Purpose is to carry
out OBEX transfers within a single adapter's session.
2012-12-04 22:48:39 +01:00
Dmitriy Paliy
d8d19199e8
obexd: remove unnecessary brackets
2012-12-04 22:48:38 +01:00
Bartosz Szatkowski
bca372b405
obexd: Fix endian conversion for appparams in pbap client
2012-12-04 22:48:36 +01:00
Luiz Augusto von Dentz
50071dde9c
obexd: add support for reusing session for the same client
...
If the a client owning a session attempt to send a new file just reuse
the same session instead of trying to connect again.
2012-12-04 22:48:36 +01:00
Luiz Augusto von Dentz
4780531beb
obexd: fix not canceling connection request if client exit bus
...
There is no point on proceeding with sdp/rfcomm connections if client
exit the bus.
2012-12-04 22:48:36 +01:00
Luiz Augusto von Dentz
553f3949b5
obexd: remove unused variable
2012-12-04 22:48:35 +01:00
Luiz Augusto von Dentz
932949fe49
obexd: Add support for stat files bigger than 2GB on 32-bit systems
...
From stat documentation:
"(stat()) path refers to a file whose size cannot be represented in the
type off_t. This can occur when an application compiled on a 32-bit
platform without -D_FILE_OFFSET_BITS=64 calls stat() on a file whose size
exceeds (2<<31)-1 bits."
To fix this now size header is omitted when the file is over 32-bit, but
it is able to transfer it by using 64-bit variables. In addition to that
folder-listing now should report such big sizes properly.
2012-12-04 22:48:32 +01:00
Luiz Augusto von Dentz
127fe7b3cf
obexd: Fix logging for obex-client
...
Since obex-client and obexd share the same log code they both were using
obexd for openlog which makes it very confusing when reading the logs.
To fix this now __obex_log_init takes the binary name so that each daemon
can be properly labeled.
2012-12-04 22:48:31 +01:00
Luiz Augusto von Dentz
22d757b954
obexd: Fix possible crash when processing session callback
...
If the callback removes the pending data it cause this:
==20639== Invalid read of size 4
==20639== at 0x80553E9: free_pending (session.c:112)
==20639== by 0x8056C83: session_request_reply (session.c:837)
==20639== by 0x412F7E0: ??? (in /lib/libdbus-1.so.3.5.2)
==20639== by 0x411D975: ??? (in /lib/libdbus-1.so.3.5.2)
==20639== by 0x4120B81: dbus_connection_dispatch (in /lib/libdbus-1.so.3.5.2)
==20639== by 0x804C27F: message_dispatch (mainloop.c:80)
==20639== by 0x407EFCB: ??? (in /lib/libglib-2.0.so.0.2600.1)
==20639== by 0x407E854: g_main_context_dispatch (in /lib/libglib-2.0.so.0.2600.1)
==20639== by 0x4082667: ??? (in /lib/libglib-2.0.so.0.2600.1)
==20639== by 0x4082BA6: g_main_loop_run (in /lib/libglib-2.0.so.0.2600.1)
==20639== by 0x8055171: main (main.c:625)
==20639== Address 0x4363c88 is 0 bytes inside a block of size 12 free'd
==20639== at 0x40257ED: free (vg_replace_malloc.c:366)
==20639== by 0x4087485: g_free (in /lib/libglib-2.0.so.0.2600.1)
==20639== by 0x80553FE: free_pending (session.c:115)
==20639== by 0x805543C: agent_free (session.c:127)
==20639== by 0x80566A6: session_free (session.c:149)
==20639== by 0x8056BCA: session_terminate_transfer (session.c:914)
==20639== by 0x8056F61: session_prepare_put (session.c:1397)
==20639== by 0x8056C74: session_request_reply (session.c:835)
==20639== by 0x412F7E0: ??? (in /lib/libdbus-1.so.3.5.2)
==20639== by 0x411D975: ??? (in /lib/libdbus-1.so.3.5.2)
==20639== by 0x4120B81: dbus_connection_dispatch (in /lib/libdbus-1.so.3.5.2)
==20639== by 0x804C27F: message_dispatch (mainloop.c:80)
To fix this agent->pending is now reset to NULL before calling the
callback, so even if the session is terminated it won't cause a free to
pending data, which is fine since it is latter freed on callback return.
2012-12-04 22:48:31 +01:00
Luiz Augusto von Dentz
972f88aa1c
obexd: Make use of transfer->err to store transfer errors
2012-12-04 22:48:28 +01:00
Daniel Orstadius
fc5c121427
obexd: Fix process pending request if transfer canceled
...
If the call to the Request method of the obex client agent returns
with an error (for example if the transfer is rejected), call
function session_terminate_transfer instead of unregister_transfer
to both unregister the transfer and handle the pending request.
2012-12-04 22:48:28 +01:00
Luiz Augusto von Dentz
4a54d91c7d
obexd: Fix possible NULL pointer deference
...
Variable "transfer" tracked as NULL was passed to function
"transfer_unregister" that dereferences it.
2012-12-04 22:48:27 +01:00
Luiz Augusto von Dentz
9fcc33bfb8
obexd: Fix not detecting errors on small files
...
Make use of gw_obex_xfer_close instead of gw_obex_xfer_flush since the
former not only flushes the remaining data but also wait for the response
catching errors that gw_obex_xfer_flush doesn't.
2012-12-04 22:48:27 +01:00
Luiz Augusto von Dentz
8702ac21b9
obexd: Fix not detecting errors when transferring the last part of the buffer
...
The last part has to be flushed in order to sent the remaining buffer as
a obex packet and detect possible errors.
2012-12-04 22:48:27 +01:00
Johan Hedberg
ca5d2090f6
obexd: Fix format string warnings for g_dbus_create_error
...
This patch fixes gcc warnings for "format not a string literal and no
format arguments".
2012-12-04 22:48:25 +01:00
Luiz Augusto von Dentz
1759d7153c
obexd: Make sure errors are reported properly to applications
...
Error message were most of the time empty.
Thanks for Vitja Makarov <vitja.makarov@gmail.com> for reporting this.
2012-12-04 22:48:24 +01:00
Luiz Augusto von Dentz
27906878d9
obexd: Fix not closing socket when connection attempt fails
...
When connection attempt fails the socket were left opened as it is not
assigned to the session, also when the connection does succeed the socket
is closed twice when the session is removed.
To fix those issues session now holds a reference to the GIOChannel
returned bt bt_io_connect so that the connection can properly close when
releasing, in addiction to that it also is marked to not close the socket
when the connection succeeds so that when removing the session it doesn't
close the socket twice.
Thanks for Vitja Makarov <vitja.makarov@gmail.com> for reporting this.
2012-12-04 22:48:23 +01:00
Luiz Augusto von Dentz
bb30d00920
obexd: reuse code when reading buffered data
...
This should also improve speed since now file transfer also tries to read
all buffered data before continue, so each progress will probably be
around the MTU size rather than buffer size.
2012-12-04 22:48:23 +01:00
Luiz Augusto von Dentz
15130f0c06
obexd: fix not reading all buffered data
2012-12-04 22:48:23 +01:00
Luiz Augusto von Dentz
8a504f047d
obexd: fix strerr option
2012-12-04 22:48:22 +01:00
Marcel Holtmann
cf7c506246
obexd: More cleanup for the logging code
2012-12-04 22:48:22 +01:00
Luiz Augusto von Dentz
dea41fe55c
obexd: Fix security requirements for legacy devices (< 2.1)
...
Make use of security low so that services like opp do not request bonding
when connecting to legacy devices.
2012-12-04 22:48:22 +01:00
Luiz Augusto von Dentz
11c141b636
obexd: Make use of BtIO on obex-client
2012-12-04 22:48:21 +01:00
Luiz Augusto Von Dentz
537072e41d
obexd: Fix transfer for empty name/mimetype specific
2012-12-04 22:48:21 +01:00
Luiz Augusto Von Dentz
0493343137
obexd: Fix not unregistering transfer when completed
2012-12-04 22:48:21 +01:00
Luiz Augusto Von Dentz
0dff3b37be
obexd: Fix memory leak when freeing transfer parameters
2012-12-04 22:48:21 +01:00
Luiz Augusto Von Dentz
4e5782eb00
obexd: Fix crash on pbap client when message was already replied/freed
2012-12-04 22:48:21 +01:00
Luiz Augusto Von Dentz
757db74df7
obexd: Fix not replying error when transfer could not be started
2012-12-04 22:48:21 +01:00
Luiz Augusto Von Dentz
fc180e2f74
obexd: Replace uses of debug with DBG
2012-12-04 22:48:21 +01:00
Luiz Augusto von Dentz
97c6683e95
obexd: Add dynamic debug feature
2012-12-04 22:48:21 +01:00
Luiz Augusto von Dentz
6ba70b4e55
obexd: Fix possible memory leak
2012-12-04 22:48:21 +01:00
Vinicius Costa Gomes
e85450cc32
obexd: Fix PullBusinessCard ignoring the file argument
...
These five commits should solve the issue reported by Daniel Abraham
on the mailing list.
2012-12-04 22:48:16 +01:00
Vinicius Costa Gomes
15820b3ab5
obexd: Fix not passing filename for pull requests
...
Now we can store the received response somewhere.
2012-12-04 22:48:16 +01:00
Vinicius Costa Gomes
6b28669b92
obexd: Fix misuse of the listing callback
...
The listing callback was being used for anything that included a type
header.
2012-12-04 22:48:16 +01:00
Vinicius Costa Gomes
1a6def174f
obexd: Fix sending the reply for pull requests too early
...
This reply was being sent too early and it was being sent on the complete
callback anyway. This was causing the sender to exit the bus too soon.
Which was causing the daemon to close the connection.
2012-12-04 22:48:16 +01:00
Luiz Augusto Von Dentz
b77a1769c2
obexd: Fix PullBusinessCard not return transfer errors
2012-12-04 22:48:12 +01:00
Luiz Augusto Von Dentz
408fb342d8
obexd: Fix RemoveSession argument to be object path instead of string
2012-12-04 22:48:12 +01:00
Luiz Augusto Von Dentz
9ce74b2d68
obexd: Move transfer implementation to its own file
2012-12-04 22:48:12 +01:00
Luiz Augusto Von Dentz
296e697160
obexd: Fix agent not being released after transfers complete
...
This requession was introduced by d57bffe46b71e17a640c11b389dd6da95f933729
that add another reference to the session for the agent.
To fix this a rework on refcount was done so that transfer now hold
references to the session and once done they release the references one
by one.
2012-12-04 22:48:12 +01:00
Luiz Augusto Von Dentz
170dcc96a5
obexd: Fix not releasing the watches when a session is freed
2012-12-04 22:48:11 +01:00
Luiz Augusto Von Dentz
b87eef8860
obexd: Fix sending packets before they are full
...
Packets should be full, expect the last piece, before they can be send to
achieve faster transfer speeds.
2012-12-04 22:48:08 +01:00
Vinicius Costa Gomes
be404857ea
obexd: Fix file corruption during PUT
...
In some cases file corruption would occur, because the order of
the arguments to memmove was inverted.
2012-12-04 22:48:08 +01:00
Vinicius Costa Gomes
71f571dc65
obexd: the session is shutdown when the agent exits the bus
2012-12-04 22:48:08 +01:00
Vinicius Costa Gomes
b2b8fbbec2
obexd: Improve the error message when setting up the bus name
2012-12-04 22:48:08 +01:00
Vinicius Costa Gomes
7480d4761f
obexd: Add support for using the logging infrastructure from obexd
2012-12-04 22:48:07 +01:00
Vinicius Costa Gomes
35d124c8b8
obexd: Fix handling of the response of the Request() method
...
The response was being ignored, now this will allow the agent to cancel
operations it doesn't want anymore and to change the name of the
object being sent.
2012-12-04 22:48:07 +01:00
Vinicius Costa Gomes
f4e714d814
obexd: Fix issue when opening the file fails during SendFiles
...
When this happens we must somehow inform the user that it has failed.
2012-12-04 22:48:07 +01:00
Marcel Holtmann
c081792026
obexd: Update Intel copyrights
2012-12-04 22:48:07 +01:00
Marcel Holtmann
4174e904a2
obexd: Update copyright information
2012-12-04 22:48:07 +01:00
Vinicius Costa Gomes
3b67aba1b3
obexd: Fix the types of session->size and session->transferred
...
These were represented as ssize_t which represent the maximum size
of the addressable memory, so they are 32bits in 32bit machines. We
were expecting them to be 64bits.
2012-12-04 22:48:06 +01:00
Claudio Takahasi
1b4bf20d6a
obexd: Fixed SendFiles to use "Source" argument.
...
SendFiles was ignoring "Source" argument and using the default adapter
always.
2012-12-04 22:48:04 +01:00
Marcel Holtmann
6541461762
obexd: Fix handling of strict-aliasing rules
2012-12-04 22:48:04 +01:00
Luiz Augusto von Dentz
6a40f1133f
obexd: Add Channel property.
...
Channel can be used to connect to specific channel without resolving target
record.
2012-12-04 22:48:04 +01:00
Vinicius Costa Gomes
83f47d59fc
obexd: Fix the registration of the Transfer interface for FTP sessions
...
When the type of the transfer was NULL, which is the case for most
GET's, the Transfer interface was not registered.
2012-12-04 22:48:03 +01:00
Marcel Holtmann
ac08e32b2a
obexd: Allow compilation with -Wsign-compare
2012-12-04 22:48:01 +01:00
Forrest Zhao
fba78dbad8
obexd: add support for Sync Putphonebook
2012-12-04 22:48:00 +01:00
Forrest Zhao
2077c66ccf
obexd: add support for Sync Getphonebook
2012-12-04 22:48:00 +01:00
Marcel Holtmann
e356b2e9ff
obexd: Fix compiler warning
2012-12-04 22:48:00 +01:00
Forrest Zhao
6a19f9408f
obexd: add initial framework support for SYNC client
2012-12-04 22:48:00 +01:00
Forrest Zhao
ee7b55d29c
obexd: use session_get_data(), session_set_data() to access 'priv' field of struct session_data
2012-12-04 22:48:00 +01:00
Forrest Zhao
5e9fcefe1a
obexd: rename pbapdata in struct session_data to priv, so that it could be reused by Sync client
2012-12-04 22:48:00 +01:00
Marcel Holtmann
e8aa19fec7
obexd: Update copyright information
2012-12-04 22:48:00 +01:00
Luiz Augusto von Dentz
04235bf3f7
obexd: Introduce GetCapabilities support to client API.
2012-12-04 22:48:00 +01:00
Marcel Holtmann
2a776169f4
obexd: Return if function type is not provided
2012-12-04 22:48:00 +01:00
Raymond Liu
d184f1d0e1
obexd: Rename SetFilters/GetFilters/ListAllFilters to SetFilter/GetFilter/ListFilterFields
2012-12-04 22:47:59 +01:00
Raymond Liu
df080bdba5
obexd: Add SetFilters and remove AddFilter, RemoveFilter for PBAP client
2012-12-04 22:47:59 +01:00
Raymond Liu
ecd621b972
obexd: Bug fix on session_get, do not register transfer twice
2012-12-04 22:47:59 +01:00
Raymond Liu
99be1da31c
obexd: Minor bug fix on Pull Search Function
2012-12-04 22:47:59 +01:00
Raymond Liu
3a1e6b3e8d
obexd: Implement Filter related function for PBAP client
2012-12-04 22:47:59 +01:00
Raymond Liu
6172e3e51f
obexd: Implement List and Search function for PBAP client
2012-12-04 22:47:59 +01:00
Raymond Liu
6497c0dd5c
obexd: add Pull function for PBAP client
2012-12-04 22:47:59 +01:00
Raymond Liu
690e25c5a0
obexd: add GetSize function for PBAP client
2012-12-04 22:47:59 +01:00
Raymond Liu
ebd3eccc79
obexd: add PullAll function for PBAP client
2012-12-04 22:47:59 +01:00
Raymond Liu
bd34b83f81
obexd: Add SetFormat and SetOrder function for PBAP client
2012-12-04 22:47:59 +01:00
Raymond Liu
75d32c6b3a
obexd: Implement Select function for PBAP Client
2012-12-04 22:47:59 +01:00
Raymond Liu
70f6779621
obexd: Export session_get and minior fix on get_xfer_listing_progess
2012-12-04 22:47:58 +01:00
Raymond Liu
331ea6fd14
obexd: Do not send NULL to g_str_equal for compare
2012-12-04 22:47:58 +01:00
Raymond Liu
258e3f73b0
obexd: Unregister service and session interfaces in session_unref
2012-12-04 22:47:58 +01:00
Marcel Holtmann
081dcc327d
obexd: Fix PBAP interface registration
2012-12-04 22:47:57 +01:00
Raymond Liu
cf27f8d323
obexd: Add framework code for pbap client
2012-12-04 22:47:57 +01:00
Vinicius Costa Gomes
7eccdecbda
obexd: Use the right types when appending the folder listing data
2012-12-04 22:47:57 +01:00
Vinicius Costa Gomes
0206932131
obexd: Sending a error message when some error occurs during folder listing
2012-12-04 22:47:56 +01:00
Vinicius Costa Gomes
ce64bca4cf
obexd: Separate getting a folder listing from getting a file
...
As there are some special conditions involving a folder listing as
no object size, storing everything inside a buffer, this is better left
apart from the "normal" case.
2012-12-04 22:47:56 +01:00
Vinicius Costa Gomes
7bf74c35d9
obexd: Sends a final Progress message when the transfer is complete
2012-12-04 22:47:56 +01:00
Vinicius Costa Gomes
bec136fcac
obexd: Adds support for dynamic buffers
2012-12-04 22:47:56 +01:00
Vinicius Costa Gomes
3570c2513e
obexd: Checks for errors in write when receiving a object
2012-12-04 22:47:56 +01:00
Vinicius Costa Gomes
79c7ab0e3e
obexd: Fixes the dbus signature of the folder listing method
2012-12-04 22:47:56 +01:00
Vinicius Costa Gomes
09364c9d3f
obexd: Do not remove owner watch in the disconnect remove watch callback
2012-12-04 22:47:56 +01:00
Vinicius Costa Gomes
90bd741085
obexd: Separate Session and Transfer properties
2012-12-04 22:47:56 +01:00
Vinicius Costa Gomes
789fcf9ad3
obexd: Removes the owner disconnect watch when removing closing the session
2012-12-04 22:47:55 +01:00
Vinicius Costa Gomes
9929152403
obexd: Dealing with folder listings
...
When the object size is unknown ends the transfer as soon as the first
packet arrives.
2012-12-04 22:47:55 +01:00
Vinicius Costa Gomes
91b2a8d879
obexd: Do not try to send a error notification if the path is invalid
2012-12-04 22:47:55 +01:00
Vinicius Costa Gomes
cceb761559
obexd: Closes the session when the client leaves the bus
2012-12-04 22:47:55 +01:00
Vinicius Costa Gomes
2874ef9574
obexd: Adds Session Close method
2012-12-04 22:47:55 +01:00
Vinicius Costa Gomes
2632843b83
obexd: Check for allocation failure when sending messages to the agent
2012-12-04 22:47:55 +01:00
Vinicius Costa Gomes
0e00848363
obexd: A little simplification
...
Moving transfer termination (closing and freeing it)
inside unregister_tranfer, to avoid repeated code.
2012-12-04 22:47:55 +01:00
Vinicius Costa Gomes
cc219ecc36
obexd: Removes memory leaks when the transfer ends
2012-12-04 22:47:55 +01:00
Vinicius Costa Gomes
128371fa69
obexd: Implements CreateFolder
2012-12-04 22:47:55 +01:00
Vinicius Costa Gomes
fb567c8a20
obexd: Adds Error to Agent methods
...
We needed a way to inform the agent that some error happened
during a transfer.
2012-12-04 22:47:55 +01:00
Johan Hedberg
59f1b41543
obexd: Remove unecessary variable
2012-12-04 22:47:55 +01:00
Claudio Takahasi
d1356b6aac
obexd: Ignore NULL sent in x-obex/folder-listing replies
...
Some broken implementations send send NULL at the ending
of the listing.
2012-12-04 22:47:55 +01:00
Claudio Takahasi
41f9926c59
obexd: Fixed segmentation fault: ListFolder doesn't register transfer path
2012-12-04 22:47:55 +01:00
Claudio Takahasi
8cd6bfd802
obexd: Added Delete method for Transfer interface
2012-12-04 22:47:55 +01:00
Claudio Takahasi
801ef25ea2
obexd: Fixed memory leak when GET fails
2012-12-04 22:47:54 +01:00
Claudio Takahasi
82a42f8b8a
obexd: Use utility function to report transfer complete
2012-12-04 22:47:54 +01:00
Claudio Takahasi
aeeacf204d
obexd: Use utility function to report transfer progress
2012-12-04 22:47:54 +01:00
Claudio Takahasi
2ec536a9e8
obexd: Writing the received data into the file
2012-12-04 22:47:54 +01:00
Claudio Takahasi
5c26329358
obexd: Added GetFile implementation
2012-12-04 22:47:53 +01:00
Vinicius Costa Gomes
50d7138fe7
obexd: Removing memory leaks when setting the target filename
2012-12-04 22:47:53 +01:00
Vinicius Costa Gomes
969cac307c
obexd: Closes the transfer as the transfer finishes
2012-12-04 22:47:53 +01:00
Vinicius Costa Gomes
9a0f822e86
obexd: Removes a memory leak
2012-12-04 22:47:53 +01:00
Vinicius Costa Gomes
5e0bf2bcb4
obexd: Stores the transfer object path in session_data too
2012-12-04 22:47:53 +01:00
Claudio Takahasi
bff8882e6c
obexd: Return an array of dictionary for ListFolder
2012-12-04 22:47:53 +01:00
Claudio Takahasi
807f9b7481
obexd: Added ListFolder method skeleton
2012-12-04 22:47:53 +01:00
Claudio Takahasi
00ec4eebd1
obexd: Removed folder parameter from ListFolder method
2012-12-04 22:47:53 +01:00
Vinicius Costa Gomes
9a3271cdea
obexd: Removes the agent watch if the agent is released
2012-12-04 22:47:52 +01:00
Vinicius Costa Gomes
2a53e26f65
obexd: Do not register the transfer interface if it was already registered
2012-12-04 22:47:52 +01:00
Vinicius Costa Gomes
6a682e9491
obexd: Only try to send messages to the agent if there's one registered
2012-12-04 22:47:52 +01:00
Vinicius Costa Gomes
ea811042ef
obexd: Removes the disconnect watch when the session is freed
2012-12-04 22:47:52 +01:00
Vinicius Costa Gomes
f97b09d4e3
obexd: Implements FTP PutFile
2012-12-04 22:47:52 +01:00
Vinicius Costa Gomes
23e6e28fb0
obexd: Support changing the filename that will be sent in the OBEX header
2012-12-04 22:47:52 +01:00
Claudio Takahasi
e356794180
obexd: Added ChangeFolder method implementation
2012-12-04 22:47:52 +01:00
Claudio Takahasi
67006129b1
obexd: Use Folder Browsing UUID length constant defined in gwobex
2012-12-04 22:47:52 +01:00
Claudio Takahasi
04b3834419
obexd: Use Folder Browsing UUID defined in gwobex.
2012-12-04 22:47:52 +01:00
Claudio Takahasi
4fafb9bae7
obexd: Added target_len in the session_data struct
2012-12-04 22:47:52 +01:00
Vinicius Costa Gomes
0b0e51f7c6
obexd: Do not create the session if the RFCOMM connection fails
2012-12-04 22:47:52 +01:00
Vinicius Costa Gomes
84f15bd2da
obexd: Adds AssignAgent and RemoveAgent
2012-12-04 22:47:52 +01:00
Marcel Holtmann
a713c4b801
obexd: Add skeleton for ExchangeBusinessCards method
2012-12-04 22:47:52 +01:00
Marcel Holtmann
bcc1b03424
obexd: Add skeleton for PullBusinessCard support
2012-12-04 22:47:51 +01:00
Claudio Takahasi
5ce1a692e2
obexd: CreateSession calls must return the object path
2012-12-04 22:47:51 +01:00
Claudio Takahasi
7adfcd3408
obexd: Added FileTransfer interface registration
2012-12-04 22:47:51 +01:00
Claudio Takahasi
cd879f3671
obexd: Renamed variables(uuid and target) to avoid misinterpretation
2012-12-04 22:47:51 +01:00
Vinicius Costa Gomes
523c0ab495
obexd: Adds support for cancelling a transfer
2012-12-04 22:47:51 +01:00
Marcel Holtmann
4e4eb54758
obexd: Fix 32-bit/64-bit printf issue
2012-12-04 22:47:51 +01:00
Marcel Holtmann
e11c6cd155
obexd: Use SESSION_BASEPATH and TRANSFER_BASEPATH
2012-12-04 22:47:51 +01:00
Claudio Takahasi
3871079dc4
obexd: Added session methods skeleton
2012-12-04 22:47:51 +01:00
Claudio Takahasi
7a92ff8110
obexd: Establish File Transfer OBEX connection when CreateSession method is called
2012-12-04 22:47:51 +01:00
Claudio Takahasi
26e1b85702
obexd: Added CreateSession skeleton
2012-12-04 22:47:51 +01:00
Vinicius Costa Gomes
2edc33c430
obexd: Fixes a segfault when disconnected trying to send multiple files
2012-12-04 22:47:51 +01:00
Claudio Takahasi
0a2a27c3eb
obexd: Fix the problem to send object larger than 4096 (session data buffer size)
2012-12-04 22:47:51 +01:00
Claudio Takahasi
aae3203aae
obexd: Fixed memory leak when session creation fails
2012-12-04 22:47:51 +01:00
Marcel Holtmann
4a276a4bfd
obexd: Call agent release method only if present
2012-12-04 22:47:51 +01:00
Marcel Holtmann
004ccc9f57
obexd: Call unref on the right data structures
2012-12-04 22:47:51 +01:00
Marcel Holtmann
4a10493605
obexd: Fix SDP record memory leak
2012-12-04 22:47:50 +01:00
Marcel Holtmann
b56b731bd9
obexd: Compile only obexd with threading support if needed
2012-12-04 22:47:50 +01:00
Marcel Holtmann
35d82f7bde
obexd: Closes the session when unable to write data to the transfer
2012-12-04 22:47:50 +01:00
Marcel Holtmann
7c20375b77
obexd: Enable threading if supported
2012-12-04 22:47:50 +01:00
Marcel Holtmann
9866ce8d55
obexd: Add initial implementation of SendFiles method
2012-12-04 22:47:48 +01:00
Marcel Holtmann
ce170a9fdc
obexd: Add skeleton for OBEX client sessions
2012-12-04 22:47:48 +01:00
Marcel Holtmann
f7b9865e51
obexd: Decode parameters of SendFiles method
2012-12-04 22:47:48 +01:00
Marcel Holtmann
3caef345d1
obexd: Update client API documentation
2012-12-04 22:47:48 +01:00
Marcel Holtmann
bd58c41ecf
obexd: Add initial steps for OBEX client implementation
2012-12-04 22:47:48 +01:00
Marcel Holtmann
ef3648a694
obexd: Add skeleton for OBEX client implementation
2012-12-04 22:47:48 +01:00