Commit Graph

6337 Commits

Author SHA1 Message Date
Johan Hedberg
65aaf349eb Fix memory allocation failure check in ALSA initialization function 2009-06-30 14:37:33 +03:00
Johan Hedberg
da8ebafe5f Coding style fixes 2009-06-30 14:31:37 +03:00
Johan Hedberg
b09e5f8892 Fix NULL check in find_port() for port->uuid 2009-06-30 14:24:54 +03:00
Johan Hedberg
465bbe7a46 Remove redundant newline characters in debug logs 2009-06-30 12:39:21 +03:00
Forrest Zhao
9a6d297c34 Misc fixes for HFP HF role 2009-06-30 12:36:54 +03:00
Johan Hedberg
c895d70113 Fix AT+CHUP when there's both a held and an active call
AT+CHUP should release the active call if there's both a held and an
active call. So instead of looking for the first non-idle call look for a
call in ACTIVE state and only then for a non-idle one. Also rename the
find_active_call() to find_non_idle_call() to indicate what it's really
doing.
2009-06-30 11:19:18 +03:00
Johan Hedberg
d331ef049b 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.
2009-06-29 16:09:07 +03:00
Bastien Nocera
03a49242f7 Less errors from the cups backend
Don't error out when either D-Bus isn't available,
bluetoothd isn't running, or there's no adapters.
2009-06-27 12:25:57 +02:00
Ohad Ben-Cohen
59901631d2 Fix short commands limit 2009-06-27 10:24:21 +02:00
Marcel Holtmann
3610df67a6 Fix signed/unsigned comparison warning 2009-06-26 09:00:54 +02:00
Jiafa Liu
e5fb1b8e7c Add support for registration of a PBAP service using sdptool 2009-06-26 08:58:50 +02:00
Luiz Augusto von Dentz
93f7f4228e Fix Adapter.CancelDeviceCreation to not unmark temporary flag.
CancelDeviceCreation should not unmark temporary flag since if the device
is connected this will make bluetoothd to not remove device object.
2009-06-25 18:43:24 +03:00
Johan Hedberg
cf9b5ffe9b Fix phone number quoting for +CCWA 2009-06-24 16:57:10 +03:00
Marcel Holtmann
bf25cf7882 Release 4.42 2009-06-21 14:27:08 +02:00
João Paulo Rechi Vita
99e1a2f757 Fix small typo 2009-06-19 23:05:40 +03:00
Johan Hedberg
6e843d1110 Fix SCO server socket for HFP HF role 2009-06-19 17:48:30 +03:00
Marcel Holtmann
7fb7455cb8 Fix another small typo 2009-06-19 11:54:37 +02:00
Marcel Holtmann
b039ed2b21 Fix typo in DiscoverServices description 2009-06-19 11:49:29 +02:00
Johan Hedberg
5ad144c524 Don't assert on AVDTP reference count bugs
In the case that the AVDTP session references weren't fully dropped when a
disconnection happens, in later reconnections the disconnect_timeout
function cound have a reference count higher than 1. These bugs naturally
need to fixed (and there's a proper error() call to log them) but we can
still handle the situation semi-cleanly instead of asserting and aborting
since the AVDTP session struct will just silently hang around and get
reused at the next connection attempt.
2009-06-17 02:37:06 +03:00
Luiz Augusto von Dentz
41b28f6b10 Add to simple-agent the ability to reject authorization requests. 2009-06-16 23:52:15 +03:00
Luiz Augusto von Dentz
910ffb4ca7 Fix regression when there is no agent registered.
The regression was introduced by audio_device_request_authorization which
cause the authorization request to be added the list no matter what
btd_request_authorization returns.
2009-06-16 23:52:10 +03:00
Luiz Augusto von Dentz
922daca3e6 Fix error return when bonding socket hang up.
The error being returned for hang up currently is
org.bluez.Error.ConnectionAttemptFailed which is not accurate since the
connection itself was already established.

This should fix it by translating the hang up to
org.bluez.Error.AuthenticationCanceled.
2009-06-16 23:51:52 +03:00
Johan Hedberg
45873a7313 Call shutdown on SCO socket before closing
Like with the A2DP signalling channel this makes sure no process reads or
writes the SCO channel after bluetoothd wants it to be closed.

At the moment of writing this patch the kernel doesn't seem to handle this
right so a fix is needed on that side too for the intended effect to take
place.
2009-06-16 00:19:02 +03:00
Johan Hedberg
b72c346901 Call shutdown() on A2DP audio stream channel before closing
This makes sure that no other process (e.g. pulseaudio) reads or writes
the stream channel after it is logically closed through the AVDTP
signalling channel.
2009-06-16 00:16:57 +03:00
Johan Hedberg
590ffe664b Always use dedicated close_sco and headset_close_rfcomm functions 2009-06-15 23:26:54 +03:00
Luiz Augusto von Dentz
e7e1be5d17 Fix bug which cause authorization to be denied in certain headsets.
Some headsets (Nokia HS-12W) connects first on avrcp and only then on hfp
so in case Trusted property is not set this will cause agent_authorize to
return -EBUSY and drop hfp connection.

The proper solution would be to group all connections requests only
sending one authorization so the agent either accept them all or not, but
that would require API changes which we are avoiding right now, so the
current fix only send one connection request which the reponse is used for
the rest of the connections.
2009-06-15 18:10:39 +03:00
Johan Hedberg
b472464eb8 Don't set the disconnect timer if both sides end up sending commands
Situations where both sides end up sending commands are rare but they can
happen. They are also not fatal since one side will usually just end up
getting a "SEP in bad state" error and give up its setup procedure while
the other sides setup succeeds.

If we have a command that's pending a reply for don't set the disconnect
timer after processing a command from the other device (this is especially
important since the timeout for our pending requests is longer than the
disconnect timeout (4 seconds vs. 1 second).
2009-06-13 18:56:03 +07:00
Marcel Holtmann
c52d015609 Don't enable gtk-doc option when using bootstrap-configure 2009-06-11 20:41:12 +02:00
Nick Pelly
fc29f95251 Add TI wl1271 to texas instruments chip list 2009-06-11 20:38:11 +02:00
Bastien Nocera
03971a2d72 Add udev mode to bluetoothd
Add --udev option to bluetoothd, to allow it to be started on-demand
from udev.

When a new adapter appears, udev would launch bluetoothd --udev.

To avoid problems with udev, bluetoothd --udev would only return
an error exit code if it wasn't already running and a real error
occurred.

When no more Bluetooth adapter are present on the system, bluetoothd
will exit after a 30 second timeout.
2009-06-11 19:47:44 +02:00
Alok Barsode
f8c3e9f4a6 Adding stop_discovery to hciops. 2009-06-11 14:28:57 +07:00
Alok Barsode
a67cf482f8 Adding start_discovery to hciops plugin. 2009-06-11 14:27:26 +07:00
Johan Hedberg
2e5aed9348 Compare sink_state with correct enum value 2009-06-10 13:53:57 +07:00
Johan Hedberg
8fdf676c2a Also fix AVRCP UNITINFO response 2009-06-09 17:03:32 +07:00
Johan Hedberg
d4b8f6e2a0 Fix AVRCP SUBUNIT INFO response to include the Panel subunit type
The specification requires this and some devices use it to detect whether
we support the Panel subunit.
2009-06-09 16:30:01 +07:00
Johan Hedberg
1422736bc6 Also check number length when choosing type of +CLCC response 2009-06-09 11:08:37 +07:00
Johan Hedberg
9d7f87e0e8 Fix bt_cancel_discovery calls in case of SDP failures
We shouldn't call bt_cancel_discovery if we're withing a SDP callback so
always make sure that p->svclass is 0 before calling
pending_connect_finalize (which uses this value to determine whether
cancelation is needed). The glib-helper.c code should still safeguard
against this too and that's what the previous commit fixes.
2009-06-08 11:06:33 +07:00
Johan Hedberg
ce0e301583 Set ctxt->session to NULL after calling sdp_close on it
This makes sure that we don't do a double-close in case the user callback
calls e.g. bt_cancel_discovery.
2009-06-08 11:03:32 +07:00
Marcel Holtmann
bbd50bd6e7 Release 4.41 2009-06-07 01:34:29 +02:00
Johan Hedberg
7b3f58ace6 Fix SDP discovery cancelling when clearing hs->pending
This patch adds checks to make sure we always call bt_cancel_discovery in
pending_connect_finalize if an SDP discovery is in progress.
2009-06-05 08:10:17 +03:00
Zygo Blaxell
3b02334c35 Add test-network to dist 2009-06-04 23:19:59 +03:00
João Paulo Rechi Vita
6863b32bb0 Fix some error messages in A2DP Source functions.
Make the messages text refer to correct function that lead to the error.
2009-06-04 17:47:50 +03:00
Luiz Augusto von Dentz
74c4a4491f Do not attempt to search HSP record in case of error on HFP record search.
HSP search should only be done in case of no HFP record is not found, in case
of error it should stop right there since the second attempt will probably lead
to tge very same error.
2009-06-03 17:55:13 +03:00
Johan Hedberg
9348dd7784 Fix headset state tracking if bt_search_service() fails within get_records() 2009-06-03 17:19:22 +03:00
Forrest Zhao
d89690657f change OFONO_MANAGER_INTERFACE to get aligned with ofono interface 2009-06-03 07:43:10 +02:00
Luiz Augusto von Dentz
c3defe6db9 Fix headset never connecting on the first attempt.
manager_allow_headset_connection was considering the connection attempt
itself as a connection when it shouldn't.
2009-06-02 18:53:06 -03:00
Luiz Augusto von Dentz
5c60413b3f Fix Adapter.RemoveDevice not being replied.
Remote device may disconnect before the timeout so do_disconnect is not
called and no reply is generated.
2009-06-02 16:53:09 -03:00
Johan Hedberg
3d8bdaa95b Fix temporary flag if Create*Device requestor exits during SDP 2009-06-02 00:25:31 +03:00
Johan Hedberg
e164ff20b9 Fix pairing process even if the ACL gets dropped before successful SDP
CreatePairedDevice should succeed if the pairing succeeds, but return only
after the SDP discovery is complete (either a success or a failure). Right
now the logic of the temporary flag and CancelDeviceCreation was such that
the device would be removed in the case of a successful pairing if the SDP
part failed.

This patch fixes the issue by clearing the temporary flag imediately after
a successful pairing but still allows CancelDeviceCreation to be called
after the pairing is complete but SDP isn't (i.e. Create*Device hasn't
returned anything yet). A new helper function for CancelDeviceCreation
called device_is_creating was added to allow easy checking of an ongoing
device creation.
2009-06-01 17:01:28 +03:00
Johan Hedberg
0b66fb8794 Fix AVDTP Discover timeout handling
The AVDTP Discover command doesn't have a SEID in it (all other commands
do) so don't try to read it from the buffer (which would cause a
segfault).
2009-05-31 23:46:14 +03:00