Jukka Rissanen [Wed, 24 Aug 2011 14:02:07 +0000 (17:02 +0300)]
service: Add NULL check
Jukka Rissanen [Wed, 24 Aug 2011 14:02:06 +0000 (17:02 +0300)]
network: Add NULL check
Jukka Rissanen [Wed, 24 Aug 2011 14:02:05 +0000 (17:02 +0300)]
connection: Service was not ref counted properly
The reference counting problems were clearly seen with VPN service.
Jukka Rissanen [Wed, 24 Aug 2011 14:02:04 +0000 (17:02 +0300)]
provider: Return existing service path if already connected
Jukka Rissanen [Wed, 24 Aug 2011 14:02:03 +0000 (17:02 +0300)]
provider: Add ref counting debug
Jukka Rissanen [Wed, 24 Aug 2011 14:02:02 +0000 (17:02 +0300)]
service: Set the service state to IDLE if method is off or unknown
Jukka Rissanen [Wed, 24 Aug 2011 14:02:01 +0000 (17:02 +0300)]
service: Fix state combining
If we have IPv6 state as DISCONNECT and IPv4 state as
ONLINE or READY then we are not disconnected.
Jukka Rissanen [Wed, 24 Aug 2011 14:02:00 +0000 (17:02 +0300)]
service: Change the debug print location to be more useful
Jukka Rissanen [Wed, 24 Aug 2011 14:01:59 +0000 (17:01 +0300)]
service: Fix function name as it is static
Jukka Rissanen [Wed, 24 Aug 2011 14:01:58 +0000 (17:01 +0300)]
service: Set the user connect status correctly for VPN
If the userconnect is not set, then informatation about authentication
errors cannot be reported by agent API.
Jukka Rissanen [Wed, 24 Aug 2011 14:01:57 +0000 (17:01 +0300)]
network: Change the service disconnect state when necessary
If we are in idle or failure states, then we should not change to
disconnect state when the service is disconnected. This is because we
were not connected in the first place.
Jukka Rissanen [Wed, 24 Aug 2011 14:01:56 +0000 (17:01 +0300)]
service: Add function to get the ipconfig state
Jukka Rissanen [Wed, 24 Aug 2011 14:01:55 +0000 (17:01 +0300)]
vpn: Set authentication failure error code properly in provider
This patch is needed so that we can catch the authentication
error from vpn driver and inform the failure to user.
Jukka Rissanen [Wed, 24 Aug 2011 14:01:54 +0000 (17:01 +0300)]
provider: NULL pointer check
Marcel Holtmann [Tue, 30 Aug 2011 21:55:49 +0000 (14:55 -0700)]
build: Disable building of iwmx and iospm by default
Marcel Holtmann [Tue, 30 Aug 2011 21:55:03 +0000 (14:55 -0700)]
nmcompat: Update with new NetworkManager connection states
Marcel Holtmann [Tue, 30 Aug 2011 18:37:14 +0000 (11:37 -0700)]
build: Fix generating links in Makefile.am
Jukka Rissanen [Fri, 26 Aug 2011 12:10:51 +0000 (15:10 +0300)]
service: Check NULL pointer when setting ipconfig
Fixes BMC#22766
Jukka Rissanen [Fri, 26 Aug 2011 11:43:10 +0000 (14:43 +0300)]
network: Read only the ipconfig data if we have no address
We must not read ipconfig data from file if there is already a valid
address that was set by service set_property().
Fixes BMC#22767
Samuel Ortiz [Thu, 25 Aug 2011 15:34:06 +0000 (17:34 +0200)]
device: Remove power pending timeout iff there is a pending request
In the ethernet case, there won't be any.
Alok Barsode [Wed, 24 Aug 2011 13:44:27 +0000 (16:44 +0300)]
storage: remove storage module framework
Alok Barsode [Wed, 24 Aug 2011 19:36:26 +0000 (21:36 +0200)]
service: Directly use service load/save functions
Alok Barsode [Wed, 24 Aug 2011 13:44:25 +0000 (16:44 +0300)]
storage: Remove technology state load/save methods from storage module
Alok Barsode [Wed, 24 Aug 2011 13:44:24 +0000 (16:44 +0300)]
test: Change path for services
Since profile support was removed, the service path changes from
/profile/default to /net/connman/service/.
Alok Barsode [Wed, 24 Aug 2011 13:44:23 +0000 (16:44 +0300)]
profile: Remove profile.c and profile.h
Alok Barsode [Wed, 24 Aug 2011 13:44:22 +0000 (16:44 +0300)]
service: Add services changed signal
Move the services changed dbus signal handling from profile.
Alok Barsode [Wed, 24 Aug 2011 13:44:21 +0000 (16:44 +0300)]
technology: Save/Load offlinemode
Load/Save offlinemode in technology.c instead of profile.c.
Alok Barsode [Wed, 24 Aug 2011 19:31:22 +0000 (21:31 +0200)]
device: Remove device persistent code
Connman now stores technology states persistently. Hence
there is no reason to store device states persistently.
Alok Barsode [Wed, 24 Aug 2011 13:44:19 +0000 (16:44 +0300)]
device: Remove caching of offlinemode in device structure
Alok Barsode [Wed, 24 Aug 2011 19:26:56 +0000 (21:26 +0200)]
technology: Remove blocked variables and associated functions
Alok Barsode [Wed, 24 Aug 2011 13:44:17 +0000 (16:44 +0300)]
rfkill: Add technology soft blocking API
Alok Barsode [Wed, 24 Aug 2011 13:44:16 +0000 (16:44 +0300)]
technology: Fix enable notifier to be invoked just once
When there are multiple devices, the technology enable notifier
was invoked multiple times. But when disabling the technology, the
disable notifier was invoked just once, hence there was a mismatch
in the technology states.
Alok Barsode [Wed, 24 Aug 2011 13:44:15 +0000 (16:44 +0300)]
technology: Remove 'available' state
The connman technology state machine is simplified.
It now has 3 states:
Offline: Technology is disabled.
Enabled: Technology is enabled.
Connected: Technology is connected.
Alok Barsode [Wed, 24 Aug 2011 13:44:14 +0000 (16:44 +0300)]
technology: Redo offlinemode logic
Traverse the list of technologies and enable/disable each instead of
traversing the device list.
Alok Barsode [Wed, 24 Aug 2011 13:44:13 +0000 (16:44 +0300)]
technology: Save state persistently
Save the technology state persistently. This will help in resuming
the technology state after offlinemode or during startup. This patch
just saves the states.
Alok Barsode [Wed, 24 Aug 2011 13:44:12 +0000 (16:44 +0300)]
technology: Remove the global device hash
There is a device list per technology. Hence removing the global
device hash.
Alok Barsode [Wed, 24 Aug 2011 13:44:11 +0000 (16:44 +0300)]
technology: Remove global rfkill table
Remove the global rfkill_table and maintain a per technology
rfkill table.
Alok Barsode [Wed, 24 Aug 2011 13:44:10 +0000 (16:44 +0300)]
technology: Modify technology enable/disable APIs
Add the pending dbus message per technology. Also move the pending
timeout from manager to technology.
Alok Barsode [Wed, 24 Aug 2011 13:44:09 +0000 (16:44 +0300)]
device: Redo pending power request logic
Use 3 values(None/Enable/Disable) for the power_pending.
It helps keep track of the ongoing pending request.
Add a pending timeout. If the daemon handling the device fails
to send a response then we need to reset the power_pending flag.
Alok Barsode [Wed, 24 Aug 2011 13:44:08 +0000 (16:44 +0300)]
device: Update profile in enable_persistent callback
Alok Barsode [Wed, 24 Aug 2011 13:44:07 +0000 (16:44 +0300)]
technology: Refactor enable/disable APIs
connman_technology_enable: Enable a technology. Enables all the
devices in the device_list of the technology.
connman_technology_enabled: Callback for connman_technology_enable.
Changes the state of the technology to ENABLED.
Ditto for connman_technology_disable/connman_technology_disabled.
Jukka Rissanen [Wed, 24 Aug 2011 07:00:22 +0000 (10:00 +0300)]
wifi: Remove unused code
Jukka Rissanen [Wed, 24 Aug 2011 07:00:21 +0000 (10:00 +0300)]
device: Device scan function made private
The __connman_device_scan() is now static as it is only
called from device.c
Jukka Rissanen [Wed, 24 Aug 2011 10:08:53 +0000 (12:08 +0200)]
connection: Default gateway is changed when reorganizing services
Fixes BMC#22540
Jukka Rissanen [Wed, 24 Aug 2011 08:36:42 +0000 (11:36 +0300)]
test: Script for testing service.MoveBefore interface
Jukka Rissanen [Wed, 24 Aug 2011 08:36:41 +0000 (11:36 +0300)]
service: Prefer online state over ready when comparing services
Jukka Rissanen [Wed, 24 Aug 2011 08:36:40 +0000 (11:36 +0300)]
service: Allow state downgrade from online to ready
Jukka Rissanen [Wed, 24 Aug 2011 08:36:39 +0000 (11:36 +0300)]
service: Allow ready service to be moved before online one
Jukka Rissanen [Wed, 24 Aug 2011 08:36:38 +0000 (11:36 +0300)]
service: Ignore ipconfig that is not active when moving service
Marcel Holtmann [Tue, 23 Aug 2011 19:39:01 +0000 (12:39 -0700)]
Release 0.77
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.
Daniel Wagner [Mon, 22 Aug 2011 12:49:15 +0000 (14:49 +0200)]
session: Update reason code on disconnect
Daniel Wagner [Mon, 22 Aug 2011 12:26:05 +0000 (14:26 +0200)]
session: reason2string return a string for unknown
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.
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.
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.
Daniel Wagner [Mon, 22 Aug 2011 11:16:04 +0000 (13:16 +0200)]
session: Don't reset session if serivce was not selected
Daniel Wagner [Mon, 22 Aug 2011 11:16:03 +0000 (13:16 +0200)]
session: Update service state in all sessions
Daniel Wagner [Mon, 22 Aug 2011 11:16:02 +0000 (13:16 +0200)]
session: Initialize service hash correctly
Samuel Ortiz [Tue, 23 Aug 2011 14:28:04 +0000 (16:28 +0200)]
service: Identation fix
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.
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
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.
Jukka Rissanen [Thu, 18 Aug 2011 07:07:51 +0000 (10:07 +0300)]
connection: Fix IPv6 host route setting when using VPN
Jukka Rissanen [Thu, 18 Aug 2011 07:07:50 +0000 (10:07 +0300)]
connection: Fix indentation
Samuel Ortiz [Wed, 17 Aug 2011 15:32:53 +0000 (17:32 +0200)]
loopback: Remove dead code
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.
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().
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.
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.
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
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
Marcel Holtmann [Tue, 16 Aug 2011 16:14:53 +0000 (09:14 -0700)]
plugin: Use weak reference for external debug statements
Marcel Holtmann [Mon, 15 Aug 2011 23:22:31 +0000 (16:22 -0700)]
plugin: Use simpler version mismatch error
Marcel Holtmann [Mon, 15 Aug 2011 23:08:26 +0000 (16:08 -0700)]
plugin: Add debug support for external plugins
Marcel Holtmann [Mon, 15 Aug 2011 23:07:28 +0000 (16:07 -0700)]
log: Use separate function for enable logging
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
manager: Defer return of setting session mode if not idle
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
notify: Add state_idle()
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.
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",
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
session: Free ifname
connman_inet_ifname() returns strdup() string.
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.
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
notify: Add service name parameter to service_add()
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
session: Fix invalid session_hash in cleanup path
Daniel Wagner [Thu, 11 Aug 2011 14:56:18 +0000 (16:56 +0200)]
session: Service changed cleanup
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.
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
session: Disconnect on destroy if needed
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
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.
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
session: Change is_connected to is_online
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.
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
service: Extend debug message for session refcounting
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
unit: Fix connect disconnect test
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
unit: Add manager state callback
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
unit: Add PropertyChanged watch for Manager
Daniel Wagner [Thu, 11 Aug 2011 14:56:17 +0000 (16:56 +0200)]
unit: Use D-Bus watch for testing ConnMan running
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.
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.
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
Jukka Rissanen [Thu, 28 Jul 2011 10:20:27 +0000 (13:20 +0300)]
ipconfig: Remember last DHCP IP address.