Removed dump log 49/83049/1 accepted/tizen/common/20160809.184133 accepted/tizen/ivi/20160809.232843 accepted/tizen/mobile/20160809.232935 accepted/tizen/tv/20160809.232806 accepted/tizen/wearable/20160809.232913 submit/tizen/20160809.065304
authortaesubkim <taesub.kim@samsung.com>
Tue, 9 Aug 2016 02:08:51 +0000 (11:08 +0900)
committertaesubkim <taesub.kim@samsung.com>
Tue, 9 Aug 2016 02:09:10 +0000 (11:09 +0900)
Change-Id: Id578f8485054790215746de1807b4891979684ea
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
CMakeLists.txt
include/wifi-dump.h [deleted file]
packaging/net-config.spec
resources/opt/etc/dump.d/module.d/network_dump.sh [deleted file]
resources/opt/etc/dump.d/module.d/network_log_dump.sh [deleted file]
src/signal-handler.c
src/wifi-dump.c [deleted file]

index 8cb1db5..b6f03fb 100755 (executable)
@@ -85,11 +85,6 @@ IF(TIZEN_WLAN_BOARD_SPRD)
        ADD_DEFINITIONS(-DTIZEN_WLAN_BOARD_SPRD)
 ENDIF(TIZEN_WLAN_BOARD_SPRD)
 
-IF(TIZEN_DEBUG_DISABLE)
-       ADD_DEFINITIONS(-DTIZEN_DEBUG_DISABLE)
-       SET(SRCS ${SRCS} src/wifi-dump.c)
-ENDIF(TIZEN_DEBUG_DISABLE)
-
 INCLUDE(FindPkgConfig)
 PKG_CHECK_MODULES(pkgs REQUIRED
        dlog
diff --git a/include/wifi-dump.h b/include/wifi-dump.h
deleted file mode 100755 (executable)
index b463032..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Network Configuration Module
- *
- * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __NETCONFIG_WIFI_DUMP_H__
-#define __NETCONFIG_WIFI_DUMP_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#define DUMP_SERVICE_BUS_NAME           "org.tizen.system.dumpservice"
-#define DUMP_SERVICE_OBJECT_PATH        "/Org/Tizen/System/DumpService"
-#define DUMP_SERVICE_INTERFACE          "org.tizen.system.dumpservice"
-
-#define DUMP_SIGNAL                    "Dump"
-#define DUMP_START_SIGNAL              "Start"
-#define DUMP_FINISH_SIGNAL             "Finish"
-
-int netconfig_dump_log(const char *path);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
index 0bcaa23..abe2a80 100755 (executable)
@@ -104,13 +104,6 @@ cp resources/usr/sbin/net-config.service %{buildroot}%{_sbindir}/net-config.serv
 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
 cp resources/etc/dbus-1/system.d/net-config.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/net-config.conf
 
-#log dump
-mkdir -p %{buildroot}%{TZ_SYS_ETC}/dump.d/module.d/
-cp resources/opt/etc/dump.d/module.d/network_log_dump.sh %{buildroot}%{TZ_SYS_ETC}/dump.d/module.d/network_log_dump.sh
-mkdir -p %{buildroot}%{TZ_SYS_VAR}/lib/net-config/
-cp resources/opt/etc/dump.d/module.d/network_log_dump.sh %{buildroot}%{TZ_SYS_VAR}/lib/net-config/network_log_dump.sh
-cp resources/opt/etc/dump.d/module.d/network_dump.sh %{buildroot}%{TZ_SYS_VAR}/lib/net-config/network_dump.sh
-
 %if 0%{?model_build_feature_wlan_wearable} == 1
 #softreset scripts
 mkdir -p %{buildroot}/usr/system/RestoreDir/softreset
@@ -160,9 +153,6 @@ ln -sf %{_unitdir}/net-config.service %{_sysconfdir}/systemd/default-extra-depen
 %attr(644,root,root) %{_unitdir}/multi-user.target.wants/net-config.service
 %endif
 %{_datadir}/license/net-config
-%attr(500,root,root) %{TZ_SYS_ETC}/dump.d/module.d/network_log_dump.sh
-%attr(500,root,root) %{TZ_SYS_VAR}/lib/net-config/network_log_dump.sh
-%attr(500,root,root) %{TZ_SYS_VAR}/lib/net-config/network_dump.sh
 %if "%{profile}" == "tv"
 %attr(644,root,root) %{_libdir}/udev/rules.d/99-wifiusb-dev.rules
 %endif
diff --git a/resources/opt/etc/dump.d/module.d/network_dump.sh b/resources/opt/etc/dump.d/module.d/network_dump.sh
deleted file mode 100755 (executable)
index 953400a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-
-# $1 is passed by dump_service
-
-export DISPLAY=:0.0
-NETWORK_ORG=/opt/usr/data/network
-NETWORK_DEBUG=$1/network
-
-/bin/mkdir -p ${NETWORK_DEBUG}
-/bin/tar -czf ${NETWORK_DEBUG}/network.tar.gz -C ${NETWORK_ORG} .
diff --git a/resources/opt/etc/dump.d/module.d/network_log_dump.sh b/resources/opt/etc/dump.d/module.d/network_log_dump.sh
deleted file mode 100755 (executable)
index 1567f8f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-
-#--------------------------------------
-#   network
-#--------------------------------------
-
-# not allow to use relative path
-if [[ $1 == *"../"* ]]
-then
-       exit -1
-fi
-
-export DISPLAY=:0.0
-NETWORK_ORG=/opt/usr/data/network
-NETWORK_DEBUG=$1/network
-
-/bin/mkdir -p ${NETWORK_DEBUG}
-
-/sbin/ifconfig > ${NETWORK_DEBUG}/ifconfig
-/bin/netstat -na > ${NETWORK_DEBUG}/netstat
-/sbin/route -n > ${NETWORK_DEBUG}/route
-/bin/cat /proc/net/wireless > ${NETWORK_DEBUG}/wireless
-/bin/cat /etc/resolv.conf > ${NETWORK_DEBUG}/resolv.conf
-/usr/bin/vconftool get memory/dnet >> ${NETWORK_DEBUG}/status
-/usr/bin/vconftool get memory/wifi >> ${NETWORK_DEBUG}/status
-/usr/bin/vconftool get file/private/wifi >> ${NETWORK_DEBUG}/status
-/usr/bin/vconftool get db/wifi >> ${NETWORK_DEBUG}/status
-/sbin/ifconfig -a > ${NETWORK_DEBUG}/ifconfig
-/bin/mv ${NETWORK_ORG}/tcpdump*.pcap* $1/../
-/bin/tar -czf ${NETWORK_DEBUG}/network.tar.gz -C ${NETWORK_ORG} .
index 34cb6f4..304234d 100755 (executable)
 #include "wifi-background-scan.h"
 #include "wifi-tdls.h"
 
-#if defined TIZEN_DEBUG_DISABLE
-#include "wifi-dump.h"
-#endif
-
 #define DBUS_SERVICE_DBUS                      "org.freedesktop.DBus"
 #define DBUS_INTERFACE_DBUS                    "org.freedesktop.DBus"
 #define SIGNAL_INTERFACE_REMOVED               "InterfaceRemoved"
@@ -87,7 +83,6 @@ static const char supplicant_signals[SIG_MAX][MAX_SIG_LEN] = {
 };
 
 static int supp_subscription_ids[SIG_MAX] = {0};
-static int dumpservice_subscription_id = 0;
 
 typedef void (*supplicant_signal_cb)(GDBusConnection *conn,
                const gchar *name, const gchar *path, const gchar *interface,
@@ -577,27 +572,6 @@ static supplicant_signal_cb supplicant_cbs[SIG_MAX] = {
                _supplicant_tdls_peer_found
 };
 
-#if defined TIZEN_DEBUG_DISABLE
-static void __netconfig_dumpservice_handler(GDBusConnection *conn,
-               const gchar *name, const gchar *path, const gchar *interface,
-               const gchar *sig, GVariant *param, gpointer user_data)
-{
-       int mode;
-       gchar *signal_path = NULL;
-
-       if (param == NULL)
-               return;
-
-       g_variant_get(param, "(io)", &mode, &signal_path);
-       DBG("Path: %s and mode: %d", signal_path, mode);
-       netconfig_dump_log(path);
-       if (signal_path)
-               g_free(signal_path);
-
-       return;
-}
-#endif
-
 void register_gdbus_signal(void)
 {
        GDBusConnection *connection = NULL;
@@ -684,25 +658,6 @@ void register_gdbus_signal(void)
 
        INFO("Successfully register Supplicant DBus signal filters");
 
-#if defined TIZEN_DEBUG_DISABLE
-       dumpservice_subscription_id = g_dbus_connection_signal_subscribe(
-                       connection,
-                       /*
-                        * Sender => For testing purpose made NULL
-                        *WPA_SUPPLICANT,
-                        */
-                       NULL,
-                       DUMP_SERVICE_INTERFACE,
-                       DUMP_SIGNAL,
-                       NULL,
-                       NULL,
-                       G_DBUS_SIGNAL_FLAGS_NONE,
-                       __netconfig_dumpservice_handler,
-                       NULL,
-                       NULL);
-
-       INFO("Successfully register Dumpservice DBus signal filter");
-#endif
        /* In case ConnMan precedes this signal register,
         * net-config should update the default connected profile.
         */
@@ -734,6 +689,4 @@ void deregister_gdbus_signal(void)
                }
        }
 
-       g_dbus_connection_signal_unsubscribe(connection,
-                       dumpservice_subscription_id);
 }
diff --git a/src/wifi-dump.c b/src/wifi-dump.c
deleted file mode 100755 (executable)
index 1878581..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Network Configuration Module
- *
- * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <glib.h>
-#include <tzplatform_config.h>
-
-#include "log.h"
-
-#include "util.h"
-#include "netdbus.h"
-#include "wifi-dump.h"
-
-#define NETWORK_DUMP_SCRIPT            tzplatform_mkpath(TZ_SYS_VAR, "/lib/net-config/network_dump.sh")
-
-static int _start_dump(gchar *dump_path)
-{
-       int rv = 0;
-       gchar *path = NETWORK_DUMP_SCRIPT;
-       char *const args[] = { path, dump_path, NULL };
-       char *const envs[] = { NULL };
-
-       rv = netconfig_execute_file(path, args, envs);
-       if (rv < 0) {
-               ERR("Fail to execute network_dump.sh");
-               return -EIO;
-       }
-
-       return 0;
-}
-
-static void _send_dump_signal(const gchar *sig_name)
-{
-       gboolean reply;
-       GDBusConnection *connection = NULL;
-       GError *error = NULL;
-
-       connection = netdbus_get_connection();
-       if (connection == NULL) {
-               DBG("GDBusconnection is NULL");
-               return;
-       }
-
-       reply = g_dbus_connection_emit_signal(connection,
-                       NULL,
-                       DUMP_SERVICE_OBJECT_PATH,
-                       DUMP_SERVICE_INTERFACE,
-                       sig_name,
-                       NULL,
-                       &error);
-       if (reply != TRUE) {
-               if (error != NULL) {
-                       ERR("Failed to send signal [%s]", error->message);
-                       g_error_free(error);
-               }
-               return;
-       }
-}
-
-int netconfig_dump_log(const char *path)
-{
-       gchar *dump_path = NULL;
-
-       if (!path) {
-               ERR("path is NULL. Dump Fail");
-               return -1;
-       }
-       ERR("Dump is started");
-       _send_dump_signal(DUMP_START_SIGNAL);
-
-       dump_path = g_strdup(path);
-       _start_dump(dump_path);
-       g_free(dump_path);
-
-       _send_dump_signal(DUMP_FINISH_SIGNAL);
-       ERR("Dump is finished");
-       return 0;
-}