summaryrefslogtreecommitdiff
path: root/src/provider.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-27provider: Don't remove a provider on errorPatrik Flykt1-7/+1
When a provider indicates error, set the corresponding service error but don't remove the provider.
2012-01-27provider: Load providers at provider driver registration timePatrik Flykt1-0/+78
Load all saved providers that have the same type as the provider driver being registered. While looking through the storage dir for directory entries starting with 'provider_', the respective settings file needs to be opened in order to check the type. Since the settings file is already opened, load all other settings as well with the help of the previously factored out functions.
2012-01-27provider: Handle connman_provider_load() in provider_create()Patrik Flykt1-2/+2
Load provider data in provider_create() if provider_register() returns success.
2012-01-27provider: Factor out service creationPatrik Flykt1-11/+25
Factor out the creation of a service when given a provider.
2012-01-27provider: Factor out keyfile loadingPatrik Flykt1-9/+17
Factor out keyfile loading from connman_provider_load() into a fuction of its own.
2012-01-27provider: Don't set provider->name when creating provider structPatrik Flykt1-3/+0
Don't unnecessarily set provider->name to the value of the provider identifier in connman_provider_get() since it's going to be reset immediately to the supplied provider name.
2012-01-24provider: Add caller information to ref/unref debug prints.Jukka Rissanen1-4/+9
2012-01-20provider: Remove provider from the hash properlyJukka Rissanen1-1/+1
We must not just do connman_provider_unref(provider) as that will leave the provider to the provider_hash and we will get free memory access error. We can just remove the provider from the hash and that will unref the provider automagically.
2012-01-20provider: VPN service can be nullJukka Rissanen1-2/+4
2012-01-20service: Refactor the service unref functionJukka Rissanen1-4/+3
2012-01-13ipconfig: Rename previously public functionsDaniel Wagner1-2/+2
Prefix them with a "__".
2012-01-10provider: Undo empty D-Bus message checkDaniel Wagner1-3/+0
This check is wrong.
2012-01-09provider: Handle empty D-Bus messageDaniel Wagner1-0/+3
2011-11-28service: Support automatically added nameserversJukka Rissanen1-1/+1
IPv6 autoconfigured nameservers can be added to resolver via netlink messages in rtnl.c. Because of this they are not seen in service object so we need to get those auto added nameserver to be added in service.c so that service can show them to user if necessary. Fixes BMC#24196
2011-11-10core: Use gcc atomics instead glib's onesDaniel Wagner1-3/+3
g_atomic_int_exchange_and_add() has been removed from glib 2.30 and g_atomic_int_add() should be used. Though there are still quite a few distros out which do not ship a glib version with g_atomic_int_add(). Instead of maintaing a compatiblilty glib layer we just use the built-in functions for atomic memory access.
2011-11-07provider: Helper function for fetching the keyfile groupPatrik Flykt1-0/+5
2011-11-07provider: Define a save function for provider driversPatrik Flykt1-0/+3
Define a save function for connman provider driver specific settings. No corresponding load function is defined since all saved settings are already loaded by connman_provider_load().
2011-11-07provider: Load and save provider dataPatrik Flykt1-0/+66
On connect, save 'Type', 'Name', 'Host' and 'VPN.Domain' provider settings. On probe, load saved keys and their values from storage and add the key/value pairs to the provider struct.
2011-09-29provider: Remove provider if there is an error when connectingJukka Rissanen1-1/+7
If vpn service cannot be started for some reason, we must remove the provider so that user can reconnect to it later.
2011-09-29provider: Fix memory leakJukka Rissanen1-0/+1
Provider name is already allocated in connman_provider_get() so we must deallocate it before setting it again.
2011-09-12provider: Return existing service path if already connectedJukka Rissanen1-4/+5
2011-09-12provider: Add ref counting debugJukka Rissanen1-2/+2
2011-09-12provider: NULL pointer checkJukka Rissanen1-0/+3
2011-07-12provider: Fix ident memory leak if provider cannot be createdPatrik Flykt1-0/+1
2011-07-12provider: Untangle create and connect code blockMarcel Holtmann1-26/+20
2011-07-12provider: Remove pointless jump to error labelMarcel Holtmann1-8/+4
This fixes a compiler warning for an uninitialized variable. And this warning is a real error. CC src/provider.o src/provider.c: In function ‘__connman_provider_create_and_connect’: src/provider.c:476: warning: ‘provider’ may be used uninitialized in this function
2011-07-07service: Use __connman_service_ipconfig_indicate_state()Daniel Wagner1-3/+3
2011-07-06provider: Get 'Host' and 'VPN.Domain' from provider structPatrik Flykt1-0/+4
2011-07-06provider: Properly set host and domain provider membersPatrik Flykt1-3/+8
Detect 'Host' and 'VPN.Domain' strings being set and insert them properly into the provider structure. Also ensure that the strings corresponding to provider structure members are not duplicated into the provider string settings hash.
2011-07-06provider: Fix memory leak; free provider->host in provider destructPatrik Flykt1-0/+1
2011-06-21provider: Remove unnecessary additional check for NULL provider structPatrik Flykt1-5/+0
2011-06-16element: Remove element.cDaniel Wagner1-0/+1
2011-06-16provider: Remove element codeDaniel Wagner1-50/+74
2011-03-28provider: Do not deference NULL pointerDaniel Wagner1-2/+4
Fixes BMC#14940
2011-02-25provider: Initial IPv6 supportSamuel Ortiz1-34/+40
2011-02-25service: Add a generic ipconfig selection routineSamuel Ortiz1-8/+2
2011-02-25provider: Remove IPv4 element registrationDaniel Wagner1-143/+21
2011-02-24network: Fix nameserver setting routineSamuel Ortiz1-1/+3
2011-02-23provider: Add IP settersDaniel Wagner1-0/+69
2011-02-15service: Refactor Service nameserver APIDaniel Wagner1-1/+1
__connman_service_append/remove_namerserver() is renamed to __connman_service_nameserver_append/remove to be more consistent with the other Service API naming. Also the semantic changes to append/remove instead of set/clear. The list of configured nameservers takes preference over the list of discovered (DHCP, VPN, ...) nameservers.
2011-02-11service: Split service state to IPv4 and IPv6 partsJukka Rissanen1-9/+18
2011-01-28provider: Report VPN error codeMohamed Abbas1-0/+24
2011-01-27provider: route_env_parse should depend on type not nameDaniel Wagner1-2/+2
2011-01-27provider: Factorize VPN routing environment variables parsingSamuel Ortiz1-43/+129
2011-01-26provider: Set service pointer for provider_set_nameserversSamuel Ortiz1-0/+5
2011-01-26provider: Implement IPv6 route settingSamuel Ortiz1-3/+19
2011-01-26provider: Handle empty nameserversDaniel Wagner1-24/+33
If the VPN server doesn't set any DNS entries provider->nameservers is NULL. When we change the state of the provider to CONNMAN_PROVIDER_STATE_READY we shouldn't do any string operations on the NULL pointer namerservers. (gdb) bt full No symbol table info available. type = CONNMAN_ELEMENT_TYPE_IPV4 nameservers = 0x0 value = 0x0 list = 0x1 = {<error reading variable list (Cannot access memory at address 0x1)> err = 0 element = 0x6a5110 name = 0x6a5550 "vpn0" second_ns = 0x69f1c0 "\004" service = 0x6a2630 No locals. Fixes BMC#12508 Reported by Jeff Zheng <jeff.zheng@intel.com>
2010-12-21openvpn: Add pushed routesDaniel Wagner1-0/+47
We should add the routing entries pushed by the OpenVPN server.
2010-12-14ipconfig: Define 2 separate pointers for IPv4 and IPv6Jukka Rissanen1-3/+18
This patch does not yet enable IPv6 only network support but it is required for later work.
2010-11-03provider: Forward peer address to the ipv4 layerSamuel Ortiz1-0/+8