}
g_variant_get(parameters, "(sss)", &ip_addr, &mac, &name);
if (!g_strcmp0(signal_name, "DhcpConnected") || !g_strcmp0(signal_name, "DhcpLeaseAdded") || !g_strcmp0(signal_name, "DhcpLeaseUpdated")) {
- SDBG("DhcpConnected signal : %s %s %s\n", ip_addr, mac, name);
+ SDBG("%s signal: '%s' '%s' '%s'\n", signal_name, ip_addr, mac, name);
/*
* DHCP ACK received, destroy timeout if exists
*/
g_free(ip_addr);
g_free(mac);
g_free(name);
- g_free(info->hostname);
- g_free(info);
DBG("-\n");
}
FILE *fp = NULL;
pid_t pid;
+ if (remove(DNSMASQ_LEASES_FILE) < 0)
+ ERR("Failed to remove %s", DNSMASQ_LEASES_FILE);
+
if (dnsmasq_pid == 0) {
fp = fopen(DNSMASQ_CONF_FILE, "w");
if (NULL == fp) {
char buf[DNSMASQ_RANGE_LEN];
DBG("+\n");
+
+ if (remove(DNSMASQ_LEASES_FILE) < 0)
+ ERR("Failed to remove %s", DNSMASQ_LEASES_FILE);
+
if (dnsmasq_pid == 0) {
pid = fork();
if (pid < 0) {