Commit Graph

118 Commits

Author SHA1 Message Date
Johan Hedberg
ad737e6427 Fix coding style issues in hciops 2010-09-22 10:46:05 +03:00
Johan Hedberg
c67ba167cc Fix usage of error variables
Integer type "err" variables should always be negative to be consistent
with the rest of the code base.
2010-09-22 10:39:15 +03:00
Elvis Pfützenreuter
5bca34b67c Add BT read clock and get conn handle to hciops 2010-09-22 10:22:49 +03:00
Bastien Nocera
d23defc944 Add new plugin to set adapter class
This time based on the kernel exported DMI, rather than calling
out to HAL. The HAL plugin can still be preferred with
--enable-hal=yes passed to configure.
2010-09-06 16:02:01 +03:00
Luiz Augusto von Dentz
43a34941ef Fix not closing fd when disconnecting on pnat plugin
This cause problems since the number of open file descriptors are
normaly limited causing errors such as:

  Can't create RFCOMM TTY: Too many open files in system
2010-09-06 10:53:45 +03:00
Johan Hedberg
da446f5edd Fix format string warnings for g_dbus_create_error
This patch fixes gcc warnings for "format not a string literal and no
format arguments".
2010-08-19 23:24:42 +03:00
Daniel Orstadius
5ac50f2903 Maemo6 MCE: handle race condition at startup
Since bluetoothd power cycles the adapter at startup, it is possible
that the plugin gets a reply from reading the state of the MCE and
tries to power the adapter before it is down. The patch checks for
that situation and if it occurs postpones powering the adapter to
the powered state callback.
2010-08-18 16:30:50 +03:00
Dmitriy Paliy
61f0df8f18 Add fast connectable to hciops
Fast connectable switches between two sets of parameters to enable
or disable fast page scan mode. Page scan interval and page scan
type are changed to speed up connectabily when needed. When
disabled it sets default values. List of btd_adapter_ops is updated
respectively.
2010-08-18 13:45:57 +03:00
Daniel Orstadius
f2591f09af Maemo6 MCE: listen to adapter powered state
Registers a callback to btd_adapter to get notified when the
powered state of the adapter is changed. This is needed to update
the state stored in the MCE if the adapter is powered on or off
using for example SetProperty(Powered). The current setting of
the MCE is saved in a variable and if the notification to the
plugin does not match this value the MCE is updated accordingly
using its DBus method for setting radio states.
2010-08-17 16:31:41 +03:00
Johan Hedberg
6c61bb330a Fix missing cleanup for the phonet-at child process
We can't call g_remove_source for the child watch since then nobody will
call waitpid when the child dies. Instead set client->child_pid to 0
after sending SIGTERM so that the child watch function doesn't try to do
cleanup to processes that were already cleared (e.g. if an old phonet-at
process stays around while a new DUN client gets connected).

The patch is based upon the initial investigation and findings by
Dmitriy Paliy <dmitriy.paliy@nokia.com>.
2010-08-17 10:27:12 +03:00
Luiz Augusto von Dentz
4fc3ab7168 Fix not storing tty id on pnatd plugin
The code used to create the port stored the id in a local variable
instead of storing it in the client data which is used to release the
port once disconnected.
2010-08-16 14:20:30 +03:00
David Scherba
65bf132120 Use HCI device type to gate BR/EDR-specific HCI commands
Use the hci_dev_info structure member 'type' to classify whether a HCI
device is BR/EDR, or not. If not, gate BR/EDR-specific HCI commands.
2010-08-10 16:03:18 -04:00
David Scherba
cf91577002 Remove non-functional hci_devinfo calls in init_device() 2010-08-10 15:19:00 -04:00
Johan Hedberg
fccdf4a507 Fix initialization of adapters in RAW mode
Make sure bluetoothd completely ignores any adapters with the RAW flag
set. This means that neither start_security_manager nor
manager_start_adapter should be called for such an adapter.
2010-07-12 14:14:01 -03:00
Luiz Augusto von Dentz
c194337f35 Introduce maemo6 plugin for following the radio state signal
Adds a plugin for listening to the MCE (Mode Control Entity)
radio state signal. Implemented in a new source file,
configuration flag for enabling it added to the build files.

The plugin registers an adapter driver containing a DBus signal
watch for receiving MCE_RADIO_STATES_SIG messages. On receiving
the signal, it sets the powered state of the adapter according
to the Bluetooth field.
2010-07-09 12:05:56 +03:00
Luiz Augusto von Dentz
90608519f3 hciops: fix not checking all possible errors 2010-07-01 12:37:46 +03:00
Gustavo F. Padovan
8e58667ef0 Move debug() to DBG()
Use the new dynamic debug feature
2010-05-21 18:21:48 +02:00
Gustavo F. Padovan
e891f7df62 Move logging.{c,h} to log.{c,h}
Try to make log stuff more similar to ConnMan and oFono.
2010-05-21 14:40:36 +02:00
Johan Hedberg
29598cc39b Update phonet-at location to match recent versions 2010-05-19 09:41:49 +02:00
Johan Hedberg
903804a0f1 Make use of common fail label in pnat_probe 2010-04-03 16:45:44 +03:00
Johan Hedberg
76208a5d26 Fix GError memory leak 2010-04-03 16:37:26 +03:00
Johan Hedberg
0a658cd945 Remove bogus if-check when DUN client disconnects 2010-04-03 16:32:36 +03:00
Johan Hedberg
895eea1347 Add initial phonet integration with the help of pnatd/phonet-at
This patch implements initial phonet support to the pnat bluetoothd
plugin by utilizing the pnatd/phonet-at phonet AT proxy/wrapper tool.
2010-04-01 15:58:23 +03:00
Luiz Augusto Von Dentz
08342d21d5 Add check for sdp_record_find 2010-03-24 23:16:45 +02:00
Johan Hedberg
1202ec1f3e Add initial skeleton for Phonet AT (DUN) plugin 2010-02-02 11:07:33 -08:00
Johan Hedberg
5592142cb9 Update Nokia copyrights 2010-01-07 01:11:05 -08:00
Marcel Holtmann
9184e2eeb7 Update copyright information 2010-01-01 17:08:17 -08:00
Marcel Holtmann
fdf703f79f Fix wrong order of error handling in netlink setup 2009-11-15 00:11:45 +01:00
Claudio Takahasi
8300366080 Some coding style fixes and removed unused function. 2009-10-26 20:04:36 -02:00
Marcel Holtmann
a5b1e3d02c Switch to a full non-recursive build system 2009-08-23 00:40:59 -07:00
Alok Barsode
d2a6bf00af Implement Class of Device cache for async behaviour.
In order to avoid race conditions for setting the Class of Device
asynchronously a queuing mechanism is needed. This patch implements that
by having the following variables in the adapter struct:

adapter->current_cod
		The currently set CoD
adapter->pending_cod
		CoD of a hci_write_cod command which didn't complete yet.
adapter->wanted_cod
		The CoD value that is ultimately desired but might not
		have been set yet.
2009-08-15 03:03:56 +03:00
Marcel Holtmann
33f51f71f9 Build the builtin plugins along with the daemon 2009-08-09 14:05:57 -07:00
Johan Hedberg
a73b597d56 Fix device name setting for mode=off when bluetoothd starts
This patch fixes the way that the device name gets set when bluetoothd
starts and the previously stored mode is off.
2009-08-04 17:11:32 +03:00
Johan Hedberg
d388309819 Remove unnecessary variable assignment 2009-08-04 16:02:35 +03:00
Alok Barsode
d209c50141 Adding read_name to hciops plugin. 2009-07-13 12:30:59 +03:00
Alok Barsode
164ccf9a66 Adding set_name to hciops plugin. 2009-07-13 12:26:19 +03:00
Alok Barsode
302eee8269 Fixing bluetoothd to avoid passing device descriptor 2009-07-07 23:42:40 +03:00
Marcel Holtmann
929393b82d Revert "Fix hciops compilation error" 2009-07-07 11:28:33 -07:00
Stefan Seyfried
5ca084eecc Fix hciops compilation error
hciops.c: In function ‘hciops_exit’:
hciops.c:728: error: call to function ‘btd_adapter_cleanup_ops’
              without a real prototype
2009-07-07 21:16:53 +03:00
Alok Barsode
b96f44db8e Adding cancel_resolve_name functionality to hciops plugin. 2009-07-02 17:08:48 +03:00
Alok Barsode
ef876daebf Adding resolve name functionality to hciops plugin. 2009-07-02 17:08:48 +03:00
Johan Hedberg
8b9bab24d5 Properly implement the hciops_cleanup() function 2009-07-01 01:06:25 +03:00
Johan Hedberg
18e8b33f0d Fix error handling in hciops initialization 2009-06-30 21:26:33 +03: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
Alok Barsode
eeba5fdb9c Adding set_limited_discoverable method to hciops plugin. 2009-05-18 16:45:26 +05:30
Alok Barsode
55927114c5 Adding set_discoverable method to hciops. 2009-05-18 13:31:21 +03:00
Alok Barsode
8b000e1700 Adding set_connectable method to hciops plugin. 2009-05-18 13:30:02 +03:00
Alok Barsode
030d865e4a Adding set_powered method to hciops plugin. 2009-05-18 13:27:31 +03:00
Alok Barsode
4e71ac8617 Adding stop() functionality to hciops plugin. 2009-05-06 12:37:44 +03:00