diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-07-29 19:05:51 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-07-29 19:05:51 -0700 |
commit | fdd5851b672523bbc976d1ae787926a80e6e0ecf (patch) | |
tree | 1a90f2d5e98301ff6be6721b6a549b0b4cc0819e /src/dhcp.c | |
parent | 742468fb58a593e15f7bf0029f31fb3104008819 (diff) | |
download | connman-fdd5851b672523bbc976d1ae787926a80e6e0ecf.tar.gz connman-fdd5851b672523bbc976d1ae787926a80e6e0ecf.tar.bz2 connman-fdd5851b672523bbc976d1ae787926a80e6e0ecf.zip |
Store host and domain names retrieved from DHCP
Diffstat (limited to 'src/dhcp.c')
-rw-r--r-- | src/dhcp.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -124,8 +124,12 @@ void connman_dhcp_set_value(struct connman_dhcp *dhcp, dhcp->element->ipv4.nameserver = g_strdup(nameservers[0]); g_strfreev(nameservers); } else if (g_strcmp0(key, "Domainname") == 0) { + g_free(dhcp->element->domainname); + dhcp->element->domainname = g_strdup(value); __connman_utsname_set_domainname(value); } else if (g_strcmp0(key, "Hostname") == 0) { + g_free(dhcp->element->hostname); + dhcp->element->hostname = g_strdup(value); __connman_utsname_set_hostname(value); } else if (g_strcmp0(key, "Timeserver") == 0) { g_free(dhcp->element->ipv4.timeserver); |