| dc659692 |
obexd: Fix bug when object size is unknown
When object size is unknown we set the size as being -1 which is then cast
to size_t * which is incorrect and may cause ENOSPC.
To fix it the unknown object size is now passed as NULL pointer to the open
callback which will just skip free space check as we don't know how much
data is to be written. |
Luiz Augusto Von Dentz |
13 years ago |
2 files, +8, -4 |
| ba365020 |
obexd: Fix reporting no space left on disk |
Luiz Augusto Von Dentz |
13 years ago |
1 file, +1, -2 |
| fb0998ac |
obexd: Fix string_read when reading chunks
The chunks normally are not NUL terminate which might cause strlen to
cause an invalid read.
The fix is basically use GString len to calculate how much data can be
copy in advance and use memcpy to do the job. |
Luiz Augusto Von Dentz |
13 years ago |
1 file, +2, -2 |
| 2330d1a1 |
obexd: Fix .read of capability driver
Capability driver .read was not returning 0 once the capability was already
read which cause obex_write_stream to interpret as there is still more data
to be read.
This should also enable reading capability in chunks if the buffer is not
big enough to accomodate the whole string. |
Luiz Augusto Von Dentz |
13 years ago |
1 file, +19, -5 |
| c6ee9285 |
obexd: Fix pcsuite service driver matching
Pcsuite is not a target but a client thus its .target should not be used
with target header.
This patch fixes it by using WHO header to search for a proper service as
indicated by the spec:
"Who is a length prefixed byte sequence used so that peer applications may
identify each other, typically to allow special additional capabilities
unique to that application or class of device to come into play." |
Luiz Augusto Von Dentz |
13 years ago |
4 files, +37, -10 |
| 1193180d |
obexd: Reduce the number of functions called to handle ftp specific mimetypes. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +2, -12 |
| 1b984f97 |
obexd: Fix missing close on BtIO create_io function
When a new BtIO is being created, if bind or setsockopts fails the
socket remains open. |
Claudio Takahasi |
13 years ago |
1 file, +41, -26 |
| c2915e66 |
obexd: Fix D-Bus error handling on synce connect |
Luiz Augusto von Dentz |
13 years ago |
1 file, +9, -2 |
| 3b67aba1 |
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. |
Vinicius Costa Gomes |
13 years ago |
1 file, +2, -2 |
| fcd285a2 |
obexd: We have to reset the session after a SET_PATH too
Without this, obexd thinks that it has received multiple name headers
in some situations, for example, when a GET is done right after a
SET_PATH. |
Vinicius Costa Gomes |
13 years ago |
1 file, +1, -0 |
| 19e380ec |
obexd: Introduce target_size to struct obex_service_driver{}
Because the OBEX target header length for each OBEX service layer
may not be the same. |
Forrest Zhao |
13 years ago |
5 files, +13, -6 |
| b4544df1 |
obexd: Implement initial OBEX server/SyncML binding for SyncEvolution
Project SyncEvolution is at http://syncevolution.org/
OBEX/SyncML binding spec is at http://www.openmobilealliance.net/
Technical/release_program/docs/Common/V1_2_1-20070813-A/
OMA-TS-SyncML_OBEXBinding-V1_2-20070221-A.pdf |
Forrest Zhao |
13 years ago |
3 files, +562, -2 |
| 226ecb85 |
obexd: Remove extra space and unnecessary cast. |
Luiz Augusto Von Dentz |
13 years ago |
1 file, +2, -2 |
| 66e479d4 |
obexd: Fix .read of folder-listing driver
This should enable reading folder-listing string in chunks similar to
capabilty driver. |
Luiz Augusto Von Dentz |
13 years ago |
2 files, +54, -72 |
| 7f1fec29 |
obexd: There could be multiple PUT data streams before they're flushed to backend |
Forrest Zhao |
13 years ago |
1 file, +3, -8 |
| 1176dba4 |
obexd: Remove unnecessary code in cmd_put()
These bufs are released in OBEX_EV_REQDONE, so no need to duplicate
the code in cmd_put() |
Forrest Zhao |
13 years ago |
1 file, +0, -15 |
| 6faf16bd |
obexd: Remove unused code. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +0, -5 |
| 53f37e55 |
obexd: Add progress callback to service driver
Progress is driver dependent thus the driver should handle this not core. |
Luiz Augusto von Dentz |
13 years ago |
3 files, +11, -3 |
| 5bb6f1c0 |
obexd: Move service specific code to its respective driver
Service specific code should not reside in core so a few extra callbacks
was created to receive this code in the drivers |
Luiz Augusto von Dentz |
13 years ago |
5 files, +110, -42 |
| fa18d433 |
obexd: Fix checks for OPP service
Object Push service driver should be not NULL, although the target is, so
the proper check should be for OBEX_OPP service and not NULL driver. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +14, -22 |
| 1968e4c5 |
obexd: Fix minor white space issue |
Johan Hedberg |
13 years ago |
1 file, +1, -1 |
| 96ea0081 |
obexd: Introduce phonebook and telephony drivers.
Those will be used by pbap plugin which is now builtin as opp and ftp and
can be set on build time using --with-phonebook and --with-telephony
(default are dummy drivers) e.g:
./configure --with-phonebook=ebook
This will expand to plugins/phonebook-ebook.c which then will be linked as
plugins/phonebook.c. |
Luiz Augusto von Dentz |
13 years ago |
7 files, +1138, -952 |
| 7aa82b38 |
obexd: Add support for builtin plugins. |
Luiz Augusto von Dentz |
13 years ago |
5 files, +20, -4 |
| cfda4371 |
obexd: Move OBEX name header check to service layer callback |
Forrest Zhao |
13 years ago |
3 files, +6, -8 |
| 7d31f72c |
obexd: Don't emit SessionCreated in case of OPP
Regression introduced with the last commit. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +2, -0 |
| 67e2aa65 |
obexd: Introduce service drivers and move command code from core to plugins.
Service driver should make possible to implement any service outside of
the core mantaining it lean. |
Luiz Augusto von Dentz |
13 years ago |
17 files, +1561, -1777 |
| a4d3df2e |
obexd: Add initial implementation of mimetype driver and filesystem plugin.
Mimetype driver handles object access if there is no driver for the given
mimetype the default one (NULL) is used, which is file driver for instance. |
Luiz Augusto von Dentz |
13 years ago |
8 files, +611, -247 |
| fad29b14 |
obexd: Fix obexd crash caused by calling agent_free with NULL pointer
By adding g_dbus_remove_watch call in unregister_agent and NULL pointer
checking in agent_free prevents obexd crash. |
Olli-Pekka Salin |
13 years ago |
1 file, +10, -2 |
| 1b4bf20d |
obexd: Fixed SendFiles to use "Source" argument.
SendFiles was ignoring "Source" argument and using the default adapter
always. |
Claudio Takahasi |
13 years ago |
1 file, +1, -1 |
| 1759dbb3 |
obexd: Fix bluetooth initialization.
Wait for g_dbus_add_service_watch to check for bluetoothd and only then
proceed with BtIO and record registration. |
Luiz Augusto von Dentz |
13 years ago |
2 files, +0, -22 |
| 1e6abca8 |
obexd: Move the BtIO code into the daemon |
Marcel Holtmann |
13 years ago |
2 files, +1365, -0 |
| b011d9c4 |
obexd: Add support for mem-type attribute when in PC Suite mode
PC Suite seems to require a mem-type attribute for a folder called Data in
order to make drag and drop to work. |
Johan Hedberg |
13 years ago |
1 file, +23, -8 |
| 65414617 |
obexd: Fix handling of strict-aliasing rules |
Marcel Holtmann |
13 years ago |
2 files, +22, -11 |
| 6a40f113 |
obexd: Add Channel property.
Channel can be used to connect to specific channel without resolving target
record. |
Luiz Augusto von Dentz |
13 years ago |
3 files, +34, -11 |
| d8cbc682 |
obexd: Add proper error logs for os_prepare_get failures |
Johan Hedberg |
13 years ago |
1 file, +9, -4 |
| 982beb2b |
obexd: Make sure the ONLCR flag is cleared for the TTY
cfmakeraw doesn't seem to clear the ONLCR flag which can cause some
strange behavior. |
Johan Hedberg |
13 years ago |
1 file, +1, -0 |
| a17573b0 |
obexd: Also apply the symlinks setting to the tty based server |
Johan Hedberg |
13 years ago |
3 files, +8, -5 |
| 50b4c3fd |
obexd: Fix free space calculation on systems where fsfilcnt_t is 32-bit
On some platforms f_bavail will be a 32-bit variable and in that case we
need to make sure that the multiplication of it with f_bsize is done in
64-bits. Therefore, explicitly typecast f_bsize to 64-bit before the
multiplication. |
Johan Hedberg |
13 years ago |
1 file, +1, -1 |
| 4f8d077f |
obexd: Remove redundant stat() call
Calling stat() before dlopen() is useless since in theory the file can get
removed between the two calls and so dlopen() needs to be able to handle
ENOENT in any case. |
Johan Hedberg |
13 years ago |
1 file, +0, -8 |
| 059a3471 |
obexd: Add proper error checks for find_adapter()
Both dbus_message_new_method_call and dbus_connection_send_with_reply can
fail if memory allocation fails so be sure to handle this cleanly. |
Johan Hedberg |
13 years ago |
1 file, +18, -4 |
| d40f8adc |
obexd: Add support for PBAP integration with EDS |
Forrest Zhao |
13 years ago |
1 file, +333, -11 |
| b0a98c3d |
obexd: Make root folder relative to $HOME if it doesn't start with '/' |
Johan Hedberg |
13 years ago |
1 file, +8, -0 |
| f791fe4e |
obexd: Add support for OBEX root folder setup script
This patch adds support for running an arbitrary script if the specified
root folder doesn't exist. This can be useful if some extra initialization
is desired for the root folder. |
Johan Hedberg |
13 years ago |
1 file, +48, -0 |
| daac89a5 |
obexd: Fix regression when bluetoothd is restarted no record is registered.
The socket was not being closed properly which makes bt_io_listen to fail
and prevent service registration. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +1, -2 |
| d51fe531 |
obexd: Fix DBusPendingCall and GIOChannel tracking
There were several issues regarding DBusPendingCall and GIOChannel reference
counting and tracking after the transition to BtIO. This patch should
(hopefully) fix these issues. |
Johan Hedberg |
13 years ago |
5 files, +61, -39 |
| 84689254 |
obexd: Get rid of duplicate connect_event function |
Johan Hedberg |
13 years ago |
3 files, +8, -25 |
| 3b850f2b |
obexd: Add printf format checking attribute |
Marcel Holtmann |
13 years ago |
1 file, +3, -3 |
| df2cebf1 |
obexd: Make use of BtIO on obexd.
BtIO can use DEFER_SETUP if the kernel supports it which make possible to
really confirm connections. |
Luiz Augusto von Dentz |
13 years ago |
3 files, +110, -104 |
| ed4a3427 |
obexd: Bring back tty reopen attempt on POLLHUP
It turns out that to get PC Suite to work properly we need to keep the
POLLHUP notifications in the kernel and have userspace retry opening the
tty on such an event. This commit essentially reverts commit
50ca8715834cbcdbf15aac3abfd75d287ebacede and adapts it to the current
state of obex.c (several things have changed so a clean revert isn't
possible). |
Johan Hedberg |
13 years ago |
1 file, +18, -2 |
| f170350e |
obexd: Handle org.freedesktop.DBus.Error.NoReply when doing authorization request.
When receiving NoReply the agent should be properly notified (using Agent.Cancel
or Adapter.CancelAuthorization) that the authorization was cancelled. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +32, -14 |