*
* Connection Manager
*
- * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
+ * Copyright (C) 2007-2012 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
#include <gdhcp/gdhcp.h>
+#include "../src/connman.h"
+
static GMainLoop *main_loop;
static void sig_term(int sig)
printf("Create DHCP server for interface %d\n", index);
dhcp_server = g_dhcp_server_new(G_DHCP_IPV4, index, &error);
- if (dhcp_server == NULL) {
+ if (!dhcp_server) {
handle_error(error);
exit(0);
}
sigaction(SIGINT, &sa, NULL);
sigaction(SIGTERM, &sa, NULL);
+ __connman_util_init();
+
g_main_loop_run(main_loop);
+ __connman_util_cleanup();
+
g_dhcp_server_unref(dhcp_server);
g_main_loop_unref(main_loop);