framework/connectivity/connman.git
13 years agoservice: Prefer online state over ready when comparing services
Jukka Rissanen [Wed, 24 Aug 2011 08:36:41 +0000 (11:36 +0300)]
service: Prefer online state over ready when comparing services

13 years agoservice: Allow state downgrade from online to ready
Jukka Rissanen [Wed, 24 Aug 2011 08:36:40 +0000 (11:36 +0300)]
service: Allow state downgrade from online to ready

13 years agoservice: Allow ready service to be moved before online one
Jukka Rissanen [Wed, 24 Aug 2011 08:36:39 +0000 (11:36 +0300)]
service: Allow ready service to be moved before online one

13 years agoservice: Ignore ipconfig that is not active when moving service
Jukka Rissanen [Wed, 24 Aug 2011 08:36:38 +0000 (11:36 +0300)]
service: Ignore ipconfig that is not active when moving service

13 years agoRelease 0.77
Marcel Holtmann [Tue, 23 Aug 2011 19:39:01 +0000 (12:39 -0700)]
Release 0.77

13 years agosession: Defer connect/disconnect calls
Daniel Wagner [Mon, 22 Aug 2011 12:58:02 +0000 (14:58 +0200)]
session: Defer connect/disconnect calls

When we call connect and disconnect a service we might
reenter the session state machine. So we should defer
these calls and finishing up the state change first.

13 years agosession: Update reason code on disconnect
Daniel Wagner [Mon, 22 Aug 2011 12:49:15 +0000 (14:49 +0200)]
session: Update reason code on disconnect

13 years agosession: reason2string return a string for unknown
Daniel Wagner [Mon, 22 Aug 2011 12:26:05 +0000 (14:26 +0200)]
session: reason2string return a string for unknown

13 years agosession: Fix selection of services
Daniel Wagner [Mon, 22 Aug 2011 12:24:18 +0000 (14:24 +0200)]
session: Fix selection of services

In case we didn't select a service (entry) reset the one
in the info (deselection). And then we have also take
a refence if the reason was CONNECT.

13 years agosession: Don't change ref count if reason code is set.
Daniel Wagner [Mon, 22 Aug 2011 11:37:08 +0000 (13:37 +0200)]
session: Don't change ref count if reason code is set.

If the reason code has been set the proper action has
been executed already.

13 years agosession: Handle service trigger according the reason code.
Daniel Wagner [Mon, 22 Aug 2011 11:34:43 +0000 (13:34 +0200)]
session: Handle service trigger according the reason code.

Instead of trying to figure out what we are supposed to do
we just rely on the reason code.

13 years agosession: Don't reset session if serivce was not selected
Daniel Wagner [Mon, 22 Aug 2011 11:16:04 +0000 (13:16 +0200)]
session: Don't reset session if serivce was not selected

13 years agosession: Update service state in all sessions
Daniel Wagner [Mon, 22 Aug 2011 11:16:03 +0000 (13:16 +0200)]
session: Update service state in all sessions

13 years agosession: Initialize service hash correctly
Daniel Wagner [Mon, 22 Aug 2011 11:16:02 +0000 (13:16 +0200)]
session: Initialize service hash correctly

13 years agoservice: Identation fix
Samuel Ortiz [Tue, 23 Aug 2011 14:28:04 +0000 (16:28 +0200)]
service: Identation fix

13 years agoservice: Save ipconfig in states where ipconfig is set up
Patrik Flykt [Mon, 22 Aug 2011 10:44:28 +0000 (13:44 +0300)]
service: Save ipconfig in states where ipconfig is set up

Service states unknown, idle and association do not have
valid ipconfig data configured. Do not save it in these states.

13 years agonetwork: Re-read ipconfig from service when setting manual addresses
Patrik Flykt [Mon, 22 Aug 2011 10:44:27 +0000 (13:44 +0300)]
network: Re-read ipconfig from service when setting manual addresses

When a service was disconnected, its ipconfig data was cleared.
Re-read service ipconfig data before setting manual addresses.

Fixes BMC#17738

13 years agoservice: Factor out reading ipconfigs from create functions
Patrik Flykt [Mon, 22 Aug 2011 10:44:26 +0000 (13:44 +0300)]
service: Factor out reading ipconfigs from create functions

Create new read functions for IPv4 and IPv6 from the code in
__connman_service_create_ip*config functions.

13 years agoconnection: Fix IPv6 host route setting when using VPN
Jukka Rissanen [Thu, 18 Aug 2011 07:07:51 +0000 (10:07 +0300)]
connection: Fix IPv6 host route setting when using VPN

13 years agoconnection: Fix indentation
Jukka Rissanen [Thu, 18 Aug 2011 07:07:50 +0000 (10:07 +0300)]
connection: Fix indentation

13 years agoloopback: Remove dead code
Samuel Ortiz [Wed, 17 Aug 2011 15:32:53 +0000 (17:32 +0200)]
loopback: Remove dead code

13 years agoservice: Propagate user proxy changes
Samuel Ortiz [Wed, 17 Aug 2011 15:27:03 +0000 (17:27 +0200)]
service: Propagate user proxy changes

Notify proxy_changed listeners when Proxy.Configuration is set/changed.

13 years agoservice: Properly disconnect network or provider on connect failure
Patrik Flykt [Wed, 17 Aug 2011 09:47:05 +0000 (12:47 +0300)]
service: Properly disconnect network or provider on connect failure

Correctly check whether a service has a network or a VPN provider
associated with it if the service fails already in
__connman_service_connect().

13 years agotask: Reset forked process signal mask
Yu A Wang [Wed, 17 Aug 2011 08:04:32 +0000 (04:04 -0400)]
task: Reset forked process signal mask

The forked process inherits connmand's signal mask and thus has TERM and
INT blocked. As a consequence it can not be killed properly if the signal
mask is not reset.

13 years agoconnection: Fix vpn on networks without gateway
Yu A Wang [Wed, 17 Aug 2011 08:04:18 +0000 (04:04 -0400)]
connection: Fix vpn on networks without gateway

VPN establishment fails on gateway less networks, like for example ppp
based cellular ones. To fix that, a host route to the VPN server is
established.

13 years agoservice: Fix wrong DNS server ip after VPN connection
Yu A Wang [Fri, 12 Aug 2011 06:43:26 +0000 (02:43 -0400)]
service: Fix wrong DNS server ip after VPN connection

We need to call default_changed function for ONLINE state after
profile changed, else get_default function will return the previous
service, this will lead to we have wrong DNS after VPN connection

13 years agoconnection: Set proper gateway for ppp links
Yu A Wang [Fri, 12 Aug 2011 06:42:16 +0000 (02:42 -0400)]
connection: Set proper gateway for ppp links

The default gateway for ppp connection should be 0.0.0.0 for ipv4
and :: for ipv6. This issue fixed before but removed by the commit
84a739d0082b89efa8cfbf376abe17937e4bc843

13 years agoplugin: Use weak reference for external debug statements
Marcel Holtmann [Tue, 16 Aug 2011 16:14:53 +0000 (09:14 -0700)]
plugin: Use weak reference for external debug statements

13 years agoplugin: Use simpler version mismatch error
Marcel Holtmann [Mon, 15 Aug 2011 23:22:31 +0000 (16:22 -0700)]
plugin: Use simpler version mismatch error

13 years agoplugin: Add debug support for external plugins
Marcel Holtmann [Mon, 15 Aug 2011 23:08:26 +0000 (16:08 -0700)]
plugin: Add debug support for external plugins

13 years agolog: Use separate function for enable logging
Marcel Holtmann [Mon, 15 Aug 2011 23:07:28 +0000 (16:07 -0700)]
log: Use separate function for enable logging

13 years agomanager: Defer return of setting session mode if not idle
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
manager: Defer return of setting session mode if not idle

13 years agonotify: Add state_idle()
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
notify: Add state_idle()

13 years agosession: Allways allow set session mode
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
session: Allways allow set session mode

If the unit test framework crashes it can happen that the session mode
is still enabled but we have a connected service. So if the unit test
restarted we wont disconnect all services and therefore block for
ever. Since it is safe to call __connman_service_disconnect_all()
again there is no need to disallow this operation.

13 years agosession: Fix empty service name
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
session: Fix empty service name

(gdb) bt
#0  __strlen_sse2 () at ../sysdeps/x86_64/strlen.S:32
#1  0x0000003a5ee2810b in marshal_string (pos_after=0x7fffffffdd80, byte_order=108, value=0x0,
    insert_at=20, str=0x6bcc50) at dbus-marshal-basic.c:778
#2  _dbus_marshal_write_basic (str=0x6bcc50, insert_at=20, type=<optimized out>,
    value=<optimized out>, byte_order=108, pos_after=0x7fffffffdd80)
    at dbus-marshal-basic.c:858
#3  0x0000003a5ee15f29 in _dbus_type_writer_write_basic_no_typecode (value=<optimized out>,
    type=115, writer=0x7fffffffdd60) at dbus-marshal-recursive.c:1589
#4  _dbus_type_writer_write_basic_no_typecode (value=<optimized out>, type=115, writer=
    0x7fffffffdd60) at dbus-marshal-recursive.c:2736
#5  _dbus_type_writer_write_basic (writer=0x7fffffffdd60, type=115, value=<optimized out>)
    at dbus-marshal-recursive.c:2311
#6  0x0000003a5ee19c1a in dbus_message_iter_append_basic (value=0x7fffffffde58, type=115, iter=
    0x7fffffffdd50) at dbus-message.c:2563
#7  dbus_message_iter_append_basic (iter=0x7fffffffdd50, type=115, value=0x7fffffffde58)
    at dbus-message.c:2506
#8  0x00000000004597ed in connman_dbus_property_append_basic (iter=0x7fffffffddd0, key=
    0x479539 "Name", type=115, val=0x7fffffffde58) at src/dbus.c:123
#9  0x000000000045e11b in connman_dbus_dict_append_basic (dict=0x7fffffffdea0, key=
    0x479539 "Name", type=115, val=0x7fffffffde58) at ./include/connman/dbus.h:112
#10 0x000000000045e8ab in append_notify (dict=0x7fffffffdea0, session=0x6d4580)
    at src/session.c:375
#11 0x000000000045ecf6 in session_notify (user_data=0x6d4580) at src/session.c:498
#12 0x000000000045f885 in session_changed (session=0x6d4580, trigger=
    CONNMAN_SESSION_TRIGGER_SERVICE) at src/session.c:954
#13 0x0000000000460f66 in service_add (service=0x6b4880, name=0x0) at src/session.c:1602
#14 0x0000000000447946 in __connman_notifier_service_add (service=0x6b4880, name=0x0)
    at src/notifier.c:413
#15 0x0000000000442fa1 in __connman_service_create_from_network (network=0x6b4af0)
    at src/service.c:4921
#16 0x00000000004332e4 in network_probe (network=0x6b4af0) at src/network.c:167
#17 0x0000000000433d32 in connman_network_set_group (network=0x6b4af0, group=
    0x699ae0 "hidden_managed_psk") at src/network.c:544
#18 0x000000000041c4a5 in network_added (supplicant_network=0x69cab0) at plugins/wifi.c:856
#19 0x000000000041d39c in callback_network_added (network=0x69cab0)
    at gsupplicant/supplicant.c:396
#20 0x000000000041e878 in add_bss_to_network (bss=0x6a68c0) at gsupplicant/supplicant.c:1023
#21 0x000000000041efa1 in bss_property (key=0x0, iter=0x0, user_data=0x6a68c0)
    at gsupplicant/supplicant.c:1205
#22 0x000000000041f5f9 in interface_bss_added_with_keys (iter=0x7fffffffe300, user_data=
    0x6a70a0) at gsupplicant/supplicant.c:1354
#23 0x0000000000420689 in signal_bss_added (path=
    0x6b7818 "/fi/w1/wpa_supplicant1/Interfaces/39", iter=0x7fffffffe300)
    at gsupplicant/supplicant.c:1783
#24 0x0000000000420cf9 in g_supplicant_filter (conn=0x699770, message=0x6a6b20, data=0x0)
    at gsupplicant/supplicant.c:1998
#25 0x0000003a5ee0f926 in dbus_connection_dispatch (connection=0x699770)
    at dbus-connection.c:4647
#26 0x000000000040c4ab in message_dispatch (data=0x699770) at gdbus/mainloop.c:80
#27 0x0000003edf64410b in g_timeout_dispatch (source=<optimized out>,
    callback=<optimized out>, user_data=<optimized out>) at gmain.c:3895
#28 0x0000003edf6427ed in g_main_dispatch (context=0x698100) at gmain.c:2441
#29 g_main_context_dispatch (context=0x698100) at gmain.c:3014
#30 0x0000003edf642fc8 in g_main_context_iterate (context=0x698100, block=<optimized out>,
    dispatch=1, self=<optimized out>) at gmain.c:3092
#31 0x0000003edf64360d in g_main_loop_run (loop=0x6980c0) at gmain.c:3300
#32 0x000000000042eab6 in main (argc=1, argv=0x7fffffffe6b8) at src/main.c:381
(gdb) f 10
#10 0x000000000045e8ab in append_notify (dict=0x7fffffffdea0, session=0x6d4580)
    at src/session.c:375
375                     connman_dbus_dict_append_basic(dict, "Name",
(gdb) l
370                             ifname = info->entry->ifname;
371                             service = info->entry->service;
372                             bearer = info->entry->bearer;
373                     }
374
375                     connman_dbus_dict_append_basic(dict, "Name",
376                                                     DBUS_TYPE_STRING,
377                                                     &name);
378
379                     connman_dbus_dict_append_dict(dict, "IPv4",

13 years agosession: Free ifname
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
session: Free ifname

connman_inet_ifname() returns strdup() string.

13 years agosession: Insert service_entry into service_list
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
session: Insert service_entry into service_list

When an element is removed from the list, the element will be passed
to destroy_service_entry() which expects only elements of type struct
service_entry.

13 years agonotify: Add service name parameter to service_add()
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
notify: Add service name parameter to service_add()

13 years agosession: Fix invalid session_hash in cleanup path
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
session: Fix invalid session_hash in cleanup path

13 years agosession: Service changed cleanup
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
session: Service changed cleanup

13 years agosession: Track reason on a session level
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
session: Track reason on a session level

We need to track the Connect()/Disconnect() on a global session level
and not only in the info. This is needed when we were not able to
select and connect to a matching service in the first place. It might
happen that a valid service is added in time and then we want to use
it.

13 years agosession: Disconnect on destroy if needed
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
session: Disconnect on destroy if needed

13 years agosession: Move code
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
session: Move code

release_session(), session_disconnect(), owner_disconnect() and
destroy_session() have been moved below session_changed. This is
a preperation step for the next patch

13 years agosession: Split test_and_disconnect()
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
session: Split test_and_disconnect()

Do split the testing into its own function and also reset the entry
member back before we call __connman_service_disconnect().

This is necessary because calling __connman_serivice_disconnect() we can
end up beeing called session_changed() before we have updated the entry.

13 years agosession: Change is_connected to is_online
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
session: Change is_connected to is_online

13 years agosession: Handle configure state
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
session: Handle configure state

We should ignore service state (ASSOCIATION, CONFIGURATION) updates
for connecting services (CONNMAN_SESSION_REASON_CONNECT). info->online
will still be false for those services. So don't set the info->reason
CONNMAN_SESSION_REASAON_FREE_RIDE.

13 years agoservice: Extend debug message for session refcounting
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
service: Extend debug message for session refcounting

13 years agounit: Fix connect disconnect test
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
unit: Fix connect disconnect test

13 years agounit: Add manager state callback
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
unit: Add manager state callback

13 years agounit: Add PropertyChanged watch for Manager
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
unit: Add PropertyChanged watch for Manager

13 years agounit: Use D-Bus watch for testing ConnMan running
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
unit: Use D-Bus watch for testing ConnMan running

13 years agowifi: Move the wifi helper function to service.c and remove wifi.c.
Alok Barsode [Wed, 10 Aug 2011 10:54:32 +0000 (13:54 +0300)]
wifi: Move the wifi helper function to service.c and remove wifi.c.

13 years agoservice: Create hidden networks with a proper group identifier
Zhang Zhengguang [Mon, 8 Aug 2011 09:42:31 +0000 (05:42 -0400)]
service: Create hidden networks with a proper group identifier

hidden_* group identifiers do not match the probe response built ones,
eventually preventing users from being able to reconnect to it.

13 years agodhcp: Try to reuse the IP address we had last time.
Jukka Rissanen [Thu, 28 Jul 2011 10:20:28 +0000 (13:20 +0300)]
dhcp: Try to reuse the IP address we had last time.

This fix will cause the DHCP_REQUESTED_IP option to be sent to
the server.

Fixes BMC #21068

13 years agoipconfig: Remember last DHCP IP address.
Jukka Rissanen [Thu, 28 Jul 2011 10:20:27 +0000 (13:20 +0300)]
ipconfig: Remember last DHCP IP address.

13 years agoofono: Improve coding style
Guillaume Zajac [Fri, 5 Aug 2011 08:51:41 +0000 (10:51 +0200)]
ofono: Improve coding style

13 years agoMakefile: Remove test-profile from test_scripts
Samuel Ortiz [Tue, 9 Aug 2011 10:22:34 +0000 (12:22 +0200)]
Makefile: Remove test-profile from test_scripts

13 years agoservice: Fix calling Agent API request input function
Patrik Flykt [Tue, 9 Aug 2011 07:59:17 +0000 (10:59 +0300)]
service: Fix calling Agent API request input function

Requesting passphrases from the user has been done only when the
ConnectService D-Bus method has been called. As user input may be
needed every time a service is connected, input requesting moved to
__connman_service_connect() instead. Also to note is that the same
service can be retried after a failed connection attempt, for those
cases an already associated service->network needs to be disconnected
before an new connection is attempted.

13 years agoservice: When indicating error, also indicate IPv6 state as failed
Patrik Flykt [Tue, 9 Aug 2011 07:59:16 +0000 (10:59 +0300)]
service: When indicating error, also indicate IPv6 state as failed

Set IPv6 ipconfig state to failure in __connman_service_indicate_error().
The return value of the function isn't used for any practical purposes,
therefore always return 0.

13 years agoservice: Correctly set 8021X, WEP and PSK passphrases
Patrik Flykt [Tue, 9 Aug 2011 07:59:15 +0000 (10:59 +0300)]
service: Correctly set 8021X, WEP and PSK passphrases

When returning a passphrase from the Agent API RequestInput method, check
the service security type and set the passphrase accordingly. For WEP and
PSK use __connman_service_set_passphrase() and for 8021X use
__connman_service_set_agent_passphrase(). Print a debug message if the
service security type is none of the three above.

13 years agoTODO: EAP-GTC support done, EAP-FAST not making progress
Henri Bragge [Mon, 1 Aug 2011 07:42:51 +0000 (10:42 +0300)]
TODO: EAP-GTC support done, EAP-FAST not making progress

13 years agotest: Remove test-profile
Samuel Ortiz [Mon, 8 Aug 2011 13:09:09 +0000 (15:09 +0200)]
test: Remove test-profile

The profile API being gone for a long time now, test-profile is
irrelevant.

13 years agowifi: network_remove: Clear network pointer in wifi
Daniel Wagner [Thu, 4 Aug 2011 15:35:37 +0000 (17:35 +0200)]
wifi: network_remove: Clear network pointer in wifi

When a network is destroyed we also have to remove the pointer
from the wifi data structure.

connmand[25303]: plugins/wifi.c:network_remove() network 0x69c350
connmand[25303]: src/network.c:connman_network_unref() network 0x69c350 name bmwnet02 refcount 1
connmand[25303]: src/network.c:connman_network_unref() network 0x69c350 name bmwnet02 refcount 0
connmand[25303]: src/network.c:network_destruct() network 0x69c350 name XXXXX

[...]

connmand[25303]: plugins/wifi.c:interface_state() wifi 0x699d60 interface state 1
connmand[25303]: plugins/wifi.c:is_idle() state 9
connmand[25303]: src/network.c:connman_network_set_associating() network 0x69c350 associating 0
connmand[25303]: src/network.c:connman_network_set_connected() network 0x69c350 connected 0

Fixes BMC#22307

13 years agoservice: Remove __connman_service_reset_from_networks()
Daniel Wagner [Thu, 4 Aug 2011 15:35:36 +0000 (17:35 +0200)]
service: Remove __connman_service_reset_from_networks()

This is not needed because there is only 1 network per
service.

Fixes BMC#22078

13 years agoofono: Destroy network_hash when disconnecting
Yu A Wang [Sat, 30 Jul 2011 03:02:56 +0000 (23:02 -0400)]
ofono: Destroy network_hash when disconnecting

13 years agoofono: Duplicate network path value
Yu A Wang [Sat, 30 Jul 2011 03:02:42 +0000 (23:02 -0400)]
ofono: Duplicate network path value

Path value will be freed after the function call, this may lead to
can't connect/reconnect to a 3G service

13 years agodevice: Free network after resetting service
Samuel Ortiz [Wed, 3 Aug 2011 17:04:24 +0000 (19:04 +0200)]
device: Free network after resetting service

After g_hash_table_remove(device->networks, identifier); the previously
cached service pointer can be invalid.

Bug reported by: Daniel Wagner <daniel.wagner@bmw-carit.de>

13 years agobuild: Remove g_dhcp_* from list of exported symbols
Marcel Holtmann [Mon, 1 Aug 2011 10:21:09 +0000 (12:21 +0200)]
build: Remove g_dhcp_* from list of exported symbols

13 years agowifi: Use agent provided credentials as a fallback
Henri Bragge [Thu, 28 Jul 2011 14:20:31 +0000 (17:20 +0300)]
wifi: Use agent provided credentials as a fallback

13 years agoservice: Store agent provided credentials separately
Henri Bragge [Thu, 28 Jul 2011 14:20:30 +0000 (17:20 +0300)]
service: Store agent provided credentials separately

Add new fields for agent provided identity/passphrase in service struct
(agent_identity/agent_passphrase) and network ("WiFi.AgentIdentity" and
"WiFi.AgentPassphrase").

Preparing these values in prepare_8021x() is left out because the same
thing is done in request_input_cb(), which is where the values always
come from.

13 years agonetwork: Remove connman_network_set_pac()
Samuel Ortiz [Thu, 28 Jul 2011 15:59:21 +0000 (17:59 +0200)]
network: Remove connman_network_set_pac()

This routine is not used.

13 years agoservice: Propagate changes of proxy auto-config url over DBus
Henri Bragge [Thu, 28 Jul 2011 15:22:45 +0000 (18:22 +0300)]
service: Propagate changes of proxy auto-config url over DBus

13 years agoservice: Enable clearing of proxy auto-config url
Henri Bragge [Thu, 28 Jul 2011 15:22:44 +0000 (18:22 +0300)]
service: Enable clearing of proxy auto-config url

This could introduce a need to null-check values where this function
is used (src/dhcp.c, src/network.c, src/provider.c). However, src/dhcp.c
requires that URL can be cleared.

13 years agoAUTHORS: Mention Bertrand's contributions
Samuel Ortiz [Thu, 28 Jul 2011 10:18:01 +0000 (12:18 +0200)]
AUTHORS: Mention Bertrand's contributions

13 years agoofono: Network name is empty when operator is not available
Bertrand Aygon [Thu, 28 Jul 2011 10:14:23 +0000 (12:14 +0200)]
ofono: Network name is empty when operator is not available

When the operator is not available and the network name is left to NULL,
the service is built with the hidden flag set.
The operator name will be updated whenever oFono passes it to ConnMan.

13 years agonetwork: Set driver pointer to NULL back if not ready
Daniel Wagner [Thu, 28 Jul 2011 10:08:40 +0000 (12:08 +0200)]
network: Set driver pointer to NULL back if not ready

The network_probe() function will be called several times until it
creates successfuly the service object.

In the case of the oFono plugin, the connman_device_add_network() is
called after the driver has been registered to the network. Therefore
the network->driver has been set but no device yet.
__connman_service_create_from_network() returns -EINVAL because
the device is not yet set.

The next call on network_probe() will bail out on 'if (network->driver
!= NULL) return -EALREADY;' so we have to reset it in the first round.

Fixes BMC #21705

13 years agoservice : Fix put data on null pointer
Thierry Boureille [Thu, 28 Jul 2011 00:35:05 +0000 (02:35 +0200)]
service : Fix put data on null pointer

when using ConnectService of Manager interface a segfault arises due
to a null pointer.

in __connman_service_create_and_connect:

[...]
service = lookup_by_identifier(name);

if (service != NULL)
goto done;

network = create_hidden_wifi(device, ssid, mode, security);
if (network != NULL) {
connman_network_set_group(network, group);
service->network_created = TRUE;
}
[...]
in this part "service" is null

13 years agonetwork: Fix double free in network_destruct()
Daniel Wagner [Mon, 25 Jul 2011 14:24:36 +0000 (16:24 +0200)]
network: Fix double free in network_destruct()

13 years agoofono: Fix network owner ship
Daniel Wagner [Mon, 25 Jul 2011 14:24:40 +0000 (16:24 +0200)]
ofono: Fix network owner ship

13 years agonetwork: Do not unref network
Daniel Wagner [Mon, 25 Jul 2011 14:24:39 +0000 (16:24 +0200)]
network: Do not unref network

13 years agowifi: Fix network owner ship
Daniel Wagner [Mon, 25 Jul 2011 14:24:38 +0000 (16:24 +0200)]
wifi: Fix network owner ship

13 years agobluetooth: Fix remove device/network
Daniel Wagner [Mon, 25 Jul 2011 14:24:37 +0000 (16:24 +0200)]
bluetooth: Fix remove device/network

13 years agodevice: Reorder cleanup
Daniel Wagner [Mon, 25 Jul 2011 14:24:35 +0000 (16:24 +0200)]
device: Reorder cleanup

If free_network is called before the driver->disable() callback
the device has been removed from the networking structure.

13 years agobluetooth: Unref network objects
Daniel Wagner [Mon, 25 Jul 2011 14:24:34 +0000 (16:24 +0200)]
bluetooth: Unref network objects

The bluetooth plugin creates the network object therefore
it should also unref (destroy) it.

13 years agodevice: Change signature of connman_device_remove_network()
Daniel Wagner [Mon, 25 Jul 2011 14:24:33 +0000 (16:24 +0200)]
device: Change signature of connman_device_remove_network()

13 years agoethernet: Take ownership of network objects
Daniel Wagner [Mon, 25 Jul 2011 14:24:32 +0000 (16:24 +0200)]
ethernet: Take ownership of network objects

Therefore destroy network objects when the carrier goes offline.

13 years agodevice: Remove needless call to __connman_network_set_device()
Daniel Wagner [Mon, 25 Jul 2011 14:24:31 +0000 (16:24 +0200)]
device: Remove needless call to __connman_network_set_device()

13 years agonetwork: Remove connman_network_register/unregister()
Daniel Wagner [Mon, 25 Jul 2011 14:24:30 +0000 (16:24 +0200)]
network: Remove connman_network_register/unregister()

Since the service object doesn't take a reference the
intermediate step of having a connman_network_register/unregister
is not needed. This function are only there to have an additional
step where probe()/remove() will be called. This is the job of
connman_device_add_network()/connman_device_remove_network().

13 years agoservice: Don't ref/unref network objects
Daniel Wagner [Mon, 25 Jul 2011 14:24:29 +0000 (16:24 +0200)]
service: Don't ref/unref network objects

which were created by the plugins. The hidden wifi
networks will be created by service and therefore
service is the owner of the network objects and
does the unref when the service is destroyed.

13 years agoservice: Update network pointer in service
Daniel Wagner [Mon, 25 Jul 2011 14:24:28 +0000 (16:24 +0200)]
service: Update network pointer in service

13 years agodevice: Fix a inbalance of ref/unref of network objects
Daniel Wagner [Mon, 25 Jul 2011 14:24:27 +0000 (16:24 +0200)]
device: Fix a inbalance of ref/unref of network objects

The destroy callback of the hash table (device->networks)
will unref and unregister the network object.

13 years agoservice: Fix memory leak
Daniel Wagner [Mon, 25 Jul 2011 14:24:26 +0000 (16:24 +0200)]
service: Fix memory leak

valgrind reports that __connman_service_nameservers_remove leaks
memory.

g_strv_length already returns the right size of the new array.

13 years agodhcp: Fix memory leak
Daniel Wagner [Mon, 25 Jul 2011 14:24:25 +0000 (16:24 +0200)]
dhcp: Fix memory leak

Reported by valgrind.

13 years agodhcp: Fix cleanup
Daniel Wagner [Mon, 25 Jul 2011 14:37:12 +0000 (16:37 +0200)]
dhcp: Fix cleanup

__connman_dhcp_cleanup() is called early in the shutdown process
(before device or network).

13 years agonetwork: Stop DHCP
Daniel Wagner [Mon, 25 Jul 2011 14:24:23 +0000 (16:24 +0200)]
network: Stop DHCP

If DHCP has been started for the IPv4 IP configuration we should also
stop it later.

The only place where it has been done so far was in
__connman_network_clear_ipconfig() which is called from
service.c:set_ipconfig(). But this will only be called if the user
changes service settings.

13 years agogweb: Fix gnutls_priority_set_direct() for various GnuTLS versions
Marcel Holtmann [Sun, 24 Jul 2011 20:51:03 +0000 (22:51 +0200)]
gweb: Fix gnutls_priority_set_direct() for various GnuTLS versions

13 years agodnsproxy: Add error print when DNS response send failed.
Jukka Rissanen [Fri, 22 Jul 2011 07:53:48 +0000 (10:53 +0300)]
dnsproxy: Add error print when DNS response send failed.

13 years agogsupplicant: set the cipher even if security is WEP
Julien Massot [Thu, 21 Jul 2011 11:46:39 +0000 (11:46 +0000)]
gsupplicant: set the cipher even if security is WEP

This patch fix an issue with WEP40, i tested it with WEP40 WEP104 and open AP.

It set the group cipher even if security is WEP otherwise connman won't connect to WEP40 service.

13 years agoiptables: Work around API breakage introduced in iptables 1.4.11
Stefan Schmidt [Wed, 20 Jul 2011 14:46:06 +0000 (16:46 +0200)]
iptables: Work around API breakage introduced in iptables 1.4.11

The xtables_merge_options() paramter list got extended without version bump.
These clumsy #ifdef's make it possible to work with newer and older iptables
libraries. It got inspired from an iproute2 patch:
https://bugs.gentoo.org/attachment.cgi?id=276401

Once all distributions start to carry 1.4.11 it can be considered to bump the
minimum version for connman and remove these ifdef's.

13 years agoRelease 0.76
Marcel Holtmann [Tue, 19 Jul 2011 22:32:08 +0000 (00:32 +0200)]
Release 0.76