platform/upstream/connman.git
13 years agoservice: Add __connman_service_session_inc()/dec()
Daniel Wagner [Mon, 9 May 2011 15:50:09 +0000 (17:50 +0200)]
service: Add __connman_service_session_inc()/dec()

13 years agosession: Track connect reason
Daniel Wagner [Mon, 9 May 2011 15:50:09 +0000 (17:50 +0200)]
session: Track connect reason

13 years agosession: Pass on all service state changes
Daniel Wagner [Mon, 9 May 2011 15:50:09 +0000 (17:50 +0200)]
session: Pass on all service state changes

All session should be informed that when there is service state change.

For example, if one session calls Session.Connect() and the other
session is only wants to free ride then it also needs to be informed
(call session_changed).

13 years agosession: Fix indention
Daniel Wagner [Mon, 9 May 2011 15:50:09 +0000 (17:50 +0200)]
session: Fix indention

13 years agoservice: Fix forwared decleration
Daniel Wagner [Mon, 9 May 2011 15:50:09 +0000 (17:50 +0200)]
service: Fix forwared decleration

13 years agotools: Add support for broken WISPr responses
Marcel Holtmann [Mon, 9 May 2011 00:51:39 +0000 (17:51 -0700)]
tools: Add support for broken WISPr responses

Some hotspots answer with 404 or 200 responses, but are still in login
stage. If the WISPr XML strings are found, treat all status results the
same to trigger login procedure.

13 years agotools: Add support for WISPr authentication polling
Marcel Holtmann [Mon, 9 May 2011 00:38:40 +0000 (17:38 -0700)]
tools: Add support for WISPr authentication polling

To log into a FON access point, the redirect site needs to be requested
since it contains the 2nd stage authentication challenge.

13 years agonetwork: Return an Error Appropriate for Function Signature
Grant Erickson [Mon, 2 May 2011 23:50:22 +0000 (16:50 -0700)]
network: Return an Error Appropriate for Function Signature

Currently, one of the return paths in __connman_network_set_ipconfig
returns FALSE, inconsistently with its function signature return type
of 'int'.

This patch returns the error code specified in 'ret'.

13 years agosession: Call update_info() if service changes
Daniel Wagner [Thu, 28 Apr 2011 16:05:06 +0000 (18:05 +0200)]
session: Call update_info() if service changes

Instead of trying to figure out when to call update_info() at various
places, just call update_info() at the end of session_changed when the
selected service has been changed.

Another noteworthy change is the remove of g_timeout_add_seconds(...,
session_notify(), ...). It was introduced to 'fix' a problem where
sometimes the notification message was not send. The source of this
problem seemed to be that session_notify() couldn't be called if the
current context was called from a incoming D-Bus call
(e.g. Session.Connect()). Though without g_timeout_add_seconds it
still works now. So it's properly better to remove it again since it's
seems not necessary.

13 years agosession: Fix NULL pointer name append
Daniel Wagner [Fri, 29 Apr 2011 12:34:27 +0000 (14:34 +0200)]
session: Fix NULL pointer name append

A network name can be NULL, for example for a wifi network.

13 years agosession: Refactor session_changed
Daniel Wagner [Thu, 28 Apr 2011 06:46:50 +0000 (08:46 +0200)]
session: Refactor session_changed

Pass the type of the trigger into session_changed. With this
additional information it's simpler to decide what to do and it allows
calling session_notify inside session_changed either directly or via
g_timeout_add_seconds.

13 years agosession: Factor out select code from session_changed
Daniel Wagner [Thu, 28 Apr 2011 12:51:29 +0000 (14:51 +0200)]
session: Factor out select code from session_changed

13 years agosession: Split service_remove_from_session()
Daniel Wagner [Thu, 28 Apr 2011 12:45:01 +0000 (14:45 +0200)]
session: Split service_remove_from_session()

The lookup can be reused later again.

13 years agosession: Update documenation
Daniel Wagner [Thu, 28 Apr 2011 12:41:46 +0000 (14:41 +0200)]
session: Update documenation

13 years agotest-session: Print more user friendly messages
Daniel Wagner [Thu, 28 Apr 2011 06:46:50 +0000 (08:46 +0200)]
test-session: Print more user friendly messages

13 years agoservice: Make the service ipconfig ops less verbose
Samuel Ortiz [Wed, 27 Apr 2011 08:48:05 +0000 (10:48 +0200)]
service: Make the service ipconfig ops less verbose

13 years agotethering: Fall back to google's DNS when dnsproxy listener addition fails
Samuel Ortiz [Wed, 27 Apr 2011 08:38:07 +0000 (10:38 +0200)]
tethering: Fall back to google's DNS when dnsproxy listener addition fails

13 years agoAUTHORS: Mention Yu's contributions
Samuel Ortiz [Wed, 27 Apr 2011 08:35:27 +0000 (10:35 +0200)]
AUTHORS: Mention Yu's contributions

13 years agontp: Fix ntpd_running return TRUE most of the time
Yu A Wang [Mon, 25 Apr 2011 08:28:17 +0000 (04:28 -0400)]
ntp: Fix ntpd_running return TRUE most of the time

uninitialized ret value will return TRUE most of the time. By adding
 bind success situation, ret will be assigned the correct value.

13 years agotethering: Use tether device IP as tethering DNS server
Yu A Wang [Thu, 21 Apr 2011 07:26:15 +0000 (03:26 -0400)]
tethering: Use tether device IP as tethering DNS server

13 years agodnsproxy: Add function __connman_dnsproxy_add/remove_listener()
Yu A Wang [Thu, 21 Apr 2011 07:26:05 +0000 (03:26 -0400)]
dnsproxy: Add function __connman_dnsproxy_add/remove_listener()

__connman_dnsproxy_add_listener() can be used to add a listener
to DNS proxy, so, besides the listener bound to lo device, listener
bound to tether device can also be added. And tethering client can
use tether as DNS server.

13 years agosession: Handle connman_inet_ifname NULL return
Daniel Wagner [Thu, 21 Apr 2011 07:39:44 +0000 (09:39 +0200)]
session: Handle connman_inet_ifname NULL return

connman_inet_ifname can return a NULL pointer. For example this
happens when all wifi interfaces are being removed because the wifi
dongle has been unplugged. The service is still valid at this point
but there is no device anymore. The kernel will then correctly return
NULL.

13 years agosession: Fix service removal from session
Daniel Wagner [Thu, 21 Apr 2011 07:37:15 +0000 (09:37 +0200)]
session: Fix service removal from session

13 years agosession: Fix update of service changes
Daniel Wagner [Thu, 21 Apr 2011 06:34:15 +0000 (08:34 +0200)]
session: Fix update of service changes

The info_last->service related entries have to be initialized
correctly. Furthermore, the session has to be notfied accordingly.

13 years agosession: Notify online setting
Daniel Wagner [Thu, 21 Apr 2011 06:34:15 +0000 (08:34 +0200)]
session: Notify online setting

13 years agosession: Fix online and priority initializing
Daniel Wagner [Thu, 21 Apr 2011 06:34:15 +0000 (08:34 +0200)]
session: Fix online and priority initializing

13 years agotimezone: Add support for writing new timezone information
Marcel Holtmann [Wed, 20 Apr 2011 17:01:34 +0000 (10:01 -0700)]
timezone: Add support for writing new timezone information

13 years agotimezone: Fix broken debug statement
Marcel Holtmann [Wed, 20 Apr 2011 15:36:54 +0000 (08:36 -0700)]
timezone: Fix broken debug statement

13 years agotools: Add private-network test
Gustavo F. Padovan [Wed, 20 Apr 2011 12:41:22 +0000 (14:41 +0200)]
tools: Add private-network test

13 years agotethering: Add private networks ip configuration and NAT
Gustavo F. Padovan [Wed, 20 Apr 2011 12:41:21 +0000 (14:41 +0200)]
tethering: Add private networks ip configuration and NAT

13 years agotethering: Add support to create private networks TUN interface
Gustavo F. Padovan [Wed, 20 Apr 2011 12:41:20 +0000 (14:41 +0200)]
tethering: Add support to create private networks TUN interface

13 years agomanager: Add hooks for the PrivateNetwork API
Gustavo F. Padovan [Wed, 20 Apr 2011 12:41:19 +0000 (14:41 +0200)]
manager: Add hooks for the PrivateNetwork API

RequestPrivateNetwork() doesn't return an fd yet and
both of them are completely dummy.

13 years agodoc: Add PrivateNetwork interface.
Gustavo F. Padovan [Wed, 20 Apr 2011 12:41:18 +0000 (14:41 +0200)]
doc: Add PrivateNetwork interface.

By now PrivateNetwork interface will cover the DUN server case.

13 years agoclock: Add skeleton for timezone change function
Marcel Holtmann [Wed, 20 Apr 2011 06:22:19 +0000 (23:22 -0700)]
clock: Add skeleton for timezone change function

13 years agoclock: Add support for timezone change notifications
Marcel Holtmann [Wed, 20 Apr 2011 06:16:49 +0000 (23:16 -0700)]
clock: Add support for timezone change notifications

13 years agomonitor-connman: Listen to session method calls
Daniel Wagner [Mon, 18 Apr 2011 11:59:26 +0000 (13:59 +0200)]
monitor-connman: Listen to session method calls

13 years agotest-session: Handle all net.connman.Error.Failed exceptions
Daniel Wagner [Mon, 18 Apr 2011 09:27:02 +0000 (11:27 +0200)]
test-session: Handle all net.connman.Error.Failed exceptions

13 years agosession: Ignore non emergency session dis/connect()
Daniel Wagner [Mon, 18 Apr 2011 09:25:13 +0000 (11:25 +0200)]
session: Ignore non emergency session dis/connect()

13 years agoclock: Add support for handling setting of time
Marcel Holtmann [Tue, 19 Apr 2011 01:45:24 +0000 (18:45 -0700)]
clock: Add support for handling setting of time

13 years agotimezone: Add support for retrieving current timezone
Marcel Holtmann [Mon, 18 Apr 2011 20:15:49 +0000 (13:15 -0700)]
timezone: Add support for retrieving current timezone

13 years agoclock: Add support for retrieving time and timezone properties
Marcel Holtmann [Mon, 18 Apr 2011 20:08:41 +0000 (13:08 -0700)]
clock: Add support for retrieving time and timezone properties

13 years agocore: Add skeleton for timezone lookup
Marcel Holtmann [Mon, 18 Apr 2011 20:05:52 +0000 (13:05 -0700)]
core: Add skeleton for timezone lookup

13 years agodbus: Add support for uint64 and int64 properties
Marcel Holtmann [Mon, 18 Apr 2011 19:55:12 +0000 (12:55 -0700)]
dbus: Add support for uint64 and int64 properties

13 years agoclock: Add support for time and timezone update properties
Marcel Holtmann [Mon, 18 Apr 2011 19:47:00 +0000 (12:47 -0700)]
clock: Add support for time and timezone update properties

13 years agotest: Add script for retrieving clock properties
Marcel Holtmann [Mon, 18 Apr 2011 19:33:23 +0000 (12:33 -0700)]
test: Add script for retrieving clock properties

13 years agoclock: Add support for timeserver modifications
Marcel Holtmann [Mon, 18 Apr 2011 19:05:22 +0000 (12:05 -0700)]
clock: Add support for timeserver modifications

13 years agotest: Add scripts for timeserver modifications
Marcel Holtmann [Mon, 18 Apr 2011 19:02:28 +0000 (12:02 -0700)]
test: Add scripts for timeserver modifications

13 years agoclock: Add D-Bus interface skeleton
Marcel Holtmann [Mon, 18 Apr 2011 18:33:19 +0000 (11:33 -0700)]
clock: Add D-Bus interface skeleton

13 years agoRelease 0.73 0.73
Marcel Holtmann [Mon, 18 Apr 2011 18:25:52 +0000 (11:25 -0700)]
Release 0.73

13 years agocore: Add skeleton for clock interfaces
Marcel Holtmann [Mon, 18 Apr 2011 18:00:43 +0000 (11:00 -0700)]
core: Add skeleton for clock interfaces

13 years agoresolver: Fix some minor whitespace issues
Marcel Holtmann [Mon, 18 Apr 2011 17:50:37 +0000 (10:50 -0700)]
resolver: Fix some minor whitespace issues

13 years agoofono: IPv6 support
Samuel Ortiz [Fri, 15 Apr 2011 18:18:01 +0000 (20:18 +0200)]
ofono: IPv6 support

13 years agoipconfig: Check for NULL pointers before calling inet_pton on them
Samuel Ortiz [Fri, 15 Apr 2011 18:17:05 +0000 (20:17 +0200)]
ipconfig: Check for NULL pointers before calling inet_pton on them

13 years agoofono: Remove update_settings forward declaration
Samuel Ortiz [Fri, 15 Apr 2011 17:56:10 +0000 (19:56 +0200)]
ofono: Remove update_settings forward declaration

13 years agoipconfig: Fix connman_ipaddress_set_ipv6 prototype
Samuel Ortiz [Fri, 15 Apr 2011 17:50:51 +0000 (19:50 +0200)]
ipconfig: Fix connman_ipaddress_set_ipv6 prototype

Switch the gateway and prefix_length order to be consistent with the ipv4
version.

13 years agoofono: Add IPv6 method and address to the info structure
Samuel Ortiz [Fri, 15 Apr 2011 17:24:45 +0000 (19:24 +0200)]
ofono: Add IPv6 method and address to the info structure

13 years agodoc: Add API description for clock interface
Marcel Holtmann [Sat, 16 Apr 2011 17:03:43 +0000 (10:03 -0700)]
doc: Add API description for clock interface

13 years agosession-api: Update documentation on EmergencyCall
Daniel Wagner [Fri, 15 Apr 2011 14:05:42 +0000 (16:05 +0200)]
session-api: Update documentation on EmergencyCall

13 years agosession: Ignore non emergency session changes
Daniel Wagner [Fri, 15 Apr 2011 11:23:45 +0000 (13:23 +0200)]
session: Ignore non emergency session changes

In the case of an emergency situation, all non emergency session
changes will be ignored.

13 years agosession: __connman_session_create initialize ecall correct
Daniel Wagner [Thu, 14 Apr 2011 11:58:01 +0000 (13:58 +0200)]
session: __connman_session_create initialize ecall correct

13 years agosession: Call session_changed if setting changes
Daniel Wagner [Thu, 14 Apr 2011 11:45:33 +0000 (13:45 +0200)]
session: Call session_changed if setting changes

13 years agosession: Move info_dirty info update_allowed_bearers
Daniel Wagner [Fri, 15 Apr 2011 13:34:24 +0000 (15:34 +0200)]
session: Move info_dirty info update_allowed_bearers

update_ecall sets also the dirty flag, so do it the same way for
update_allowed_bearers.

13 years agosession: Only one session can set EmergencyCall
Daniel Wagner [Wed, 13 Apr 2011 13:46:32 +0000 (15:46 +0200)]
session: Only one session can set EmergencyCall

Also propate EmergencyCall setting to all sessions.

13 years agosession: Introduce append all flag.
Daniel Wagner [Fri, 15 Apr 2011 06:58:34 +0000 (08:58 +0200)]
session: Introduce append all flag.

When the session is created all current settings should be send to the
Notify Object. One way is to look if the current value
(e.g. EmergencyCall) has changed to the last value. This seems like a
good plan though the code got quite ugly. So let's introduce a flag
for append all. This makes the initializing code quite simple.

13 years agosession: Notify only changed settings
Daniel Wagner [Thu, 14 Apr 2011 11:02:52 +0000 (13:02 +0200)]
session: Notify only changed settings

13 years agotest-session: Allow multi test sessions
Daniel Wagner [Thu, 14 Apr 2011 06:54:15 +0000 (08:54 +0200)]
test-session: Allow multi test sessions

13 years agoTODO: Set owner on core private networks implementation
Guillaume Zajac [Thu, 14 Apr 2011 12:57:09 +0000 (14:57 +0200)]
TODO: Set owner on core private networks implementation

13 years agosession: Handle AllowedBearers changes
Daniel Wagner [Tue, 12 Apr 2011 11:09:13 +0000 (13:09 +0200)]
session: Handle AllowedBearers changes

Update service_list when AllowedBearers is changed.

13 years agosession: Refactor service add/remove code
Daniel Wagner [Mon, 11 Apr 2011 11:26:08 +0000 (13:26 +0200)]
session: Refactor service add/remove code

When a service is added or removed from a session, session.c has to
re-evaluate the new situation, e.g. should session.c try to connect to
a new service.

13 years agosession: Keep a copy of last settings
Daniel Wagner [Tue, 12 Apr 2011 06:53:35 +0000 (08:53 +0200)]
session: Keep a copy of last settings

In order to be able to find out which setting has changed (e.g. for
the notify update call), it's necessary to have a shadow copy (last
value) from all settings.

13 years agosession: session2bearer return "" instead NULL
Daniel Wagner [Tue, 12 Apr 2011 09:31:44 +0000 (11:31 +0200)]
session: session2bearer return "" instead NULL

If an invalid bearer name is used, e.g. ethenret instead of ethernet
then session->name will be a NULL pointer. Appending a NULL string
with connman_dbus_property_append_basic is not allowed.

13 years agosession: Track application connect/disconnect state
Daniel Wagner [Tue, 12 Apr 2011 06:53:35 +0000 (08:53 +0200)]
session: Track application connect/disconnect state

13 years agosession: Add notify service_add()/remove()
Daniel Wagner [Tue, 12 Apr 2011 06:53:35 +0000 (08:53 +0200)]
session: Add notify service_add()/remove()

Also sort service_list when it's populated with services.

13 years agonotify: Add service_add()/remove()
Daniel Wagner [Tue, 12 Apr 2011 06:53:35 +0000 (08:53 +0200)]
notify: Add service_add()/remove()

13 years agosession: Fix allowed_bearers initialization
Daniel Wagner [Tue, 12 Apr 2011 06:53:35 +0000 (08:53 +0200)]
session: Fix allowed_bearers initialization

13 years agosession: Add session overview documentation
Daniel Wagner [Tue, 12 Apr 2011 06:53:35 +0000 (08:53 +0200)]
session: Add session overview documentation

13 years agogweb: numeric session address was not resolved properly.
Jukka Rissanen [Tue, 5 Apr 2011 10:57:41 +0000 (13:57 +0300)]
gweb: numeric session address was not resolved properly.

Reported by: Sebastien Bianti <sebastien.bianti@linux.intel.com>

13 years agoconfig: Use static function to validate identifiers
Samuel Ortiz [Mon, 11 Apr 2011 19:11:05 +0000 (21:11 +0200)]
config: Use static function to validate identifiers

Config file names are not exposed through D-Bus, so there is no need to
run connman_dbus_validate_ident() on them.
Checking for a readable string still makes sense though.

13 years agoconfig: Fix compiler warning on 64 bits hosts
Samuel Ortiz [Mon, 11 Apr 2011 11:30:56 +0000 (13:30 +0200)]
config: Fix compiler warning on 64 bits hosts

13 years agoconfig: Default config protection set to TRUE
Samuel Ortiz [Mon, 11 Apr 2011 10:01:00 +0000 (12:01 +0200)]
config: Default config protection set to TRUE

Configs will be protected, unless explicitely set otherwise.

13 years agoconfig: Remove the from_fs config field
Samuel Ortiz [Mon, 11 Apr 2011 09:43:13 +0000 (11:43 +0200)]
config: Remove the from_fs config field

D-Bus provisions will also be immutable, and will be allowed to overwrite
unprotected configs.

13 years agoconfig: Check SSID length before comparing protected SSIDs
Samuel Ortiz [Mon, 11 Apr 2011 09:10:58 +0000 (11:10 +0200)]
config: Check SSID length before comparing protected SSIDs

13 years agoconfig: Save D-Bus provisioned files
Samuel Ortiz [Mon, 11 Apr 2011 09:07:37 +0000 (11:07 +0200)]
config: Save D-Bus provisioned files

They will not be able to overwrite protected configs though.

13 years agoconfig: Fix service pointers memory leak
Samuel Ortiz [Fri, 8 Apr 2011 19:35:49 +0000 (21:35 +0200)]
config: Fix service pointers memory leak

13 years agoconfig: Do not overwrite protected services
Samuel Ortiz [Sat, 9 Apr 2011 00:20:09 +0000 (02:20 +0200)]
config: Do not overwrite protected services

13 years agoconfig: Add configuration protected flag
Samuel Ortiz [Fri, 8 Apr 2011 18:08:33 +0000 (20:08 +0200)]
config: Add configuration protected flag

13 years agoconfig: Set from_fs to connman_bool_t
Samuel Ortiz [Fri, 8 Apr 2011 17:55:45 +0000 (19:55 +0200)]
config: Set from_fs to connman_bool_t

13 years agoprofile: Remove profile D-Bus API
Samuel Ortiz [Fri, 8 Apr 2011 16:54:00 +0000 (18:54 +0200)]
profile: Remove profile D-Bus API

13 years agoconfig: Avoid create_config forward declaration
Samuel Ortiz [Fri, 8 Apr 2011 15:44:01 +0000 (17:44 +0200)]
config: Avoid create_config forward declaration

13 years agotest: Add script to test manager.ProvisionService method
Henri Bragge [Tue, 5 Apr 2011 14:00:35 +0000 (17:00 +0300)]
test: Add script to test manager.ProvisionService method

13 years agomanager: Implement service provisioning via dbus
Henri Bragge [Fri, 1 Apr 2011 08:41:41 +0000 (11:41 +0300)]
manager: Implement service provisioning via dbus

13 years agoconfig: Export a function to load service configs
Henri Bragge [Fri, 1 Apr 2011 08:41:40 +0000 (11:41 +0300)]
config: Export a function to load service configs

__connman_config_load_service() function can be used by other parts of
ConnMan core to load service configurations, which can later be used
for service provisioning.

Within config.c, a special field (from_fs) will be used to mark which
configurations originate from the filesystem and which do not. This
information is needed to manage service immutability. Also a special
name "internal" will be used to label the "file" used for non-fs
configurations. A real file will not be created by ConnMan, and it will
be silently ignored if created by someone else. Filesystem storage can
be implemented later if necessary.

13 years agoservice: Provide a function to query immutability
Henri Bragge [Fri, 1 Apr 2011 08:41:39 +0000 (11:41 +0300)]
service: Provide a function to query immutability

13 years agoconfig: Fix service configuration update
Henri Bragge [Fri, 1 Apr 2011 08:41:38 +0000 (11:41 +0300)]
config: Fix service configuration update

Service config should not be replaced after update (the existing struct
shall be reused).

13 years agodoc: Add service provisioning method in Manager API
Henri Bragge [Fri, 1 Apr 2011 08:41:37 +0000 (11:41 +0300)]
doc: Add service provisioning method in Manager API

13 years agosession: connect_session: Fix unitialized callback
Daniel Wagner [Mon, 11 Apr 2011 06:30:38 +0000 (08:30 +0200)]
session: connect_session: Fix unitialized callback

Furthermore, the service pointer has to be set to NULL when the
service is not idle, connecting, or connected.

13 years agosession: connect_session: Check correct pointer
Daniel Wagner [Fri, 8 Apr 2011 15:13:14 +0000 (17:13 +0200)]
session: connect_session: Check correct pointer

13 years agosession: Fix Session.Connect()/Disconnect()
Daniel Wagner [Fri, 8 Apr 2011 08:22:01 +0000 (10:22 +0200)]
session: Fix Session.Connect()/Disconnect()

Instead of using __connman_service_session_connect() for connecting
session.c uses __connman_service_connect() directly
(__connman_service_disconnect accordingly). Those two calls are using
their own glib callback source and can update the session state
accoring the return value from __connman_service_connect()/disconnect().

13 years agoservice: Add __connman_service_is_idle()
Daniel Wagner [Fri, 8 Apr 2011 13:19:25 +0000 (15:19 +0200)]
service: Add __connman_service_is_idle()

13 years agosession: Update connect/disconnect documation
Daniel Wagner [Fri, 8 Apr 2011 08:29:57 +0000 (10:29 +0200)]
session: Update connect/disconnect documation