const char *command[] = { BIN_DIR "/sudo", arg, NULL };
if (!mtetherd_launch_script(command)) {
g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Error launching USB networking script");
const char *command[] = { BIN_DIR "/sudo", arg, NULL };
if (!mtetherd_launch_script(command)) {
g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Error launching USB networking script");
- g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "Can't load mtetherd icon: %s", err->message);
+ g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Can't load mtetherd icon: %s", err->message);
GtkWidget *image = gtk_image_new_from_pixbuf(icon);
hildon_button_set_image(HILDON_BUTTON(plugin->priv->enable_button), image);
hildon_button_set_image_position(HILDON_BUTTON(plugin->priv->enable_button), GTK_POS_LEFT);
GtkWidget *image = gtk_image_new_from_pixbuf(icon);
hildon_button_set_image(HILDON_BUTTON(plugin->priv->enable_button), image);
hildon_button_set_image_position(HILDON_BUTTON(plugin->priv->enable_button), GTK_POS_LEFT);
- hildon_banner_show_informationf(GTK_WIDGET(plugin), NULL, "Initialized mtetherd status plugin");
+ //hildon_banner_show_informationf(GTK_WIDGET(plugin), NULL, "Initialized mtetherd status plugin");
+ g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "Initialized mtetherd status plugin");
if (mtetherd_device_list_add(plugin->priv->devices, device)) {
if (g_strcmp0(USBNET_INTERFACE, interface) == 0) {
if (mtetherd_device_list_add(plugin->priv->devices, device)) {
if (g_strcmp0(USBNET_INTERFACE, interface) == 0) {
plugin->priv->usbnet_state = MTETHERD_STATUS_PLUGIN_USB_NET_ENABLED;
mtetherd_status_plugin_enable_button_set_text(plugin);
}
hildon_banner_show_informationf(GTK_WIDGET(plugin), NULL, "Starting network on %s", interface);
plugin->priv->usbnet_state = MTETHERD_STATUS_PLUGIN_USB_NET_ENABLED;
mtetherd_status_plugin_enable_button_set_text(plugin);
}
hildon_banner_show_informationf(GTK_WIDGET(plugin), NULL, "Starting network on %s", interface);
gchar *addr = mtetherd_device_get_addr(device);
gchar *netmask = mtetherd_device_get_netmask(device);
gchar *dhcp_start = mtetherd_device_get_dhcp_start(device);
gchar *dhcp_end = mtetherd_device_get_dhcp_end(device);
gchar *addr = mtetherd_device_get_addr(device);
gchar *netmask = mtetherd_device_get_netmask(device);
gchar *dhcp_start = mtetherd_device_get_dhcp_start(device);
gchar *dhcp_end = mtetherd_device_get_dhcp_end(device);
const char *command[] = { BIN_DIR "/sudo", SBIN_DIR "/mtetherd-net-setup.sh", interface, addr, netmask, dhcp_start, dhcp_end, NULL };
if (!mtetherd_launch_script(command)) {
g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Error launching USB networking setup script");
const char *command[] = { BIN_DIR "/sudo", SBIN_DIR "/mtetherd-net-setup.sh", interface, addr, netmask, dhcp_start, dhcp_end, NULL };
if (!mtetherd_launch_script(command)) {
g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Error launching USB networking setup script");
} else {
g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Error adding network interface to list: Maximum number of devices exceeded");
}
} else {
g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Error adding network interface to list: Maximum number of devices exceeded");
}
if (plugin && plugin->priv) {
MTetherDDevice *device = mtetherd_device_list_find(plugin->priv->devices, udi);
if (plugin && plugin->priv) {
MTetherDDevice *device = mtetherd_device_list_find(plugin->priv->devices, udi);
plugin->priv->usbnet_state = MTETHERD_STATUS_PLUGIN_USB_NET_DISABLED;
mtetherd_status_plugin_enable_button_set_text(plugin);
}
hildon_banner_show_informationf(GTK_WIDGET(plugin), NULL, "Shutting down network on %s", interface);
plugin->priv->usbnet_state = MTETHERD_STATUS_PLUGIN_USB_NET_DISABLED;
mtetherd_status_plugin_enable_button_set_text(plugin);
}
hildon_banner_show_informationf(GTK_WIDGET(plugin), NULL, "Shutting down network on %s", interface);
const char *command[] = { BIN_DIR "/sudo", SBIN_DIR "/mtetherd-net-shutdown.sh", interface, NULL };
if (!mtetherd_launch_script(command)) {
g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Error launching USB networking shutdown script");
}
const char *command[] = { BIN_DIR "/sudo", SBIN_DIR "/mtetherd-net-shutdown.sh", interface, NULL };
if (!mtetherd_launch_script(command)) {
g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Error launching USB networking shutdown script");
}
}
if (!mtetherd_device_list_remove(plugin->priv->devices, udi)) {
g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Error removing network interface from list: Not found");
}
if (!mtetherd_device_list_remove(plugin->priv->devices, udi)) {
g_log(MTETHERD_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Error removing network interface from list: Not found");