X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fmain.c;h=6c4c648ec242f0886b36ad8f48bbd314831428be;hb=dde802157c07a6dcae13cd156f45fa2f72159e66;hp=c3a3584c0037d71b43df10be8a709b6e3294e512;hpb=343a1f3129a20e6d0db15e41e4d8a765e3fd8462;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git diff --git a/src/main.c b/src/main.c index c3a3584..6c4c648 100755 --- a/src/main.c +++ b/src/main.c @@ -32,17 +32,17 @@ #include "wifi-agent.h" #include "wifi-power.h" #include "vpnsvc.h" +#include "mptcp.h" #include "network-clock.h" #include "network-dpm.h" #include "network-state.h" #include "network-monitor.h" #include "signal-handler.h" #include "network-statistics.h" +#include "network-dump.h" static GMainLoop *main_loop = NULL; -#define ETHERNET_FEATURE "http://tizen.org/feature/network.ethernet" - /*Poll the ethernet Cable Plug-in /Plug-out status at every 1000 ms*/ #define ETH_POLLING_TIME 1000 @@ -59,6 +59,7 @@ void _got_name_cb(void) state_object_create_and_init(); statistics_object_create_and_init(); vpnsvc_create_and_init(); + mptcp_object_create_and_init(); register_gdbus_signal(); connman_register_agent(); @@ -74,13 +75,13 @@ static void _objects_deinit(void) state_object_deinit(); statistics_object_deinit(); vpnsvc_destroy_deinit(); + mptcp_object_deinit(); } int main(int argc, char *argv[]) { int ret; int check_ethernet_monitor_timer = 0; - bool ethernet_feature_supported = FALSE; umask(0077); @@ -127,6 +128,11 @@ int main(int argc, char *argv[]) /* For device policy manager */ netconfig_dpm_init(); + /* Start tcpdump if dump state is on */ +#if defined TIZEN_DEBUG_ENABLE + check_dump_state_and_start(); +#endif + if (TIZEN_WLAN_BOARD_SPRD) wifi_firmware_download(); @@ -134,19 +140,19 @@ int main(int argc, char *argv[]) if (TIZEN_TV && emulator_is_emulated() == FALSE) __netconfig_set_ether_macaddr(); - if (!system_info_get_platform_bool(ETHERNET_FEATURE, ðernet_feature_supported)) { - if (ethernet_feature_supported == TRUE) { - /* Register the callback to check the ethernet Plug-in /Plug-out Status */ - check_ethernet_monitor_timer = g_timeout_add(ETH_POLLING_TIME, - __net_ethernet_cable_status_polling_callback, - &check_ethernet_monitor_timer); - } - } else { - ERR("Error - Feature getting from System Info"); + if (netconfig_check_feature_supported(NETCONFIG_SUPPORTED_FEATURE_ETHERNET)) { + /* Register the callback to check the ethernet Plug-in /Plug-out Status */ + check_ethernet_monitor_timer = g_timeout_add(ETH_POLLING_TIME, + __net_ethernet_cable_status_polling_callback, + &check_ethernet_monitor_timer); } + netconfig_plugin_init(); + g_main_loop_run(main_loop); + netconfig_plugin_deinit(); + _objects_deinit(); log_cleanup();