Remove newline char from dlog prints. 46/139546/1 accepted/tizen/4.0/unified/20170816.010424 accepted/tizen/unified/20170724.020251 submit/tizen/20170721.063342 submit/tizen/20170721.063811 submit/tizen_4.0/20170811.094300
authorMilind Ramesh Murhekar <m.murhekar@samsung.com>
Wed, 19 Jul 2017 09:06:22 +0000 (14:36 +0530)
committerMilind Ramesh Murhekar <m.murhekar@samsung.com>
Wed, 19 Jul 2017 09:06:22 +0000 (14:36 +0530)
Change-Id: Ic76343f76b0588d3724b3cfb967c1aebadc9d9e3
Signed-off-by: Milind Ramesh Murhekar <m.murhekar@samsung.com>
src/network-cm-intf.c
src/network-dbus-request.c
src/network-profile-intf.c
src/network-wifi-intf.c

index 74c5570..4836beb 100755 (executable)
@@ -87,7 +87,7 @@ static int __net_add_route(const char *ip_addr, const char *interface, int addre
                        NETCONFIG_NETWORK_INTERFACE, "AddRoute", params, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to add route\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to add route");
                goto done;
        }
 
@@ -95,7 +95,7 @@ static int __net_add_route(const char *ip_addr, const char *interface, int addre
        gboolean add_result = FALSE;
 
        g_variant_get(message, "(b)", &add_result);
-       NETWORK_LOG(NETWORK_HIGH, "Add route, result : %d\n", add_result);
+       NETWORK_LOG(NETWORK_HIGH, "Add route, result : %d", add_result);
 
        if (add_result)
                Error = NET_ERR_NONE;
@@ -132,7 +132,7 @@ static int __net_remove_route(const char *ip_addr, const char *interface, int ad
                        NETCONFIG_NETWORK_INTERFACE, "RemoveRoute", params, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route");
                goto done;
        }
 
@@ -140,7 +140,7 @@ static int __net_remove_route(const char *ip_addr, const char *interface, int ad
        gboolean remove_result = FALSE;
 
        g_variant_get(message, "(b)", &remove_result);
-       NETWORK_LOG(NETWORK_HIGH, "Remove route, result : %d\n", remove_result);
+       NETWORK_LOG(NETWORK_HIGH, "Remove route, result : %d", remove_result);
 
        if (remove_result)
                Error = NET_ERR_NONE;
@@ -179,7 +179,7 @@ static int __net_add_route_entry(const char *ip_addr, const char *interface, int
                        NETCONFIG_NETWORK_INTERFACE, "AddRoute", params, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to add route\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to add route");
                goto done;
        }
 
@@ -187,7 +187,7 @@ static int __net_add_route_entry(const char *ip_addr, const char *interface, int
        gboolean add_result = FALSE;
 
        g_variant_get(message, "(b)", &add_result);
-       NETWORK_LOG(NETWORK_HIGH, "Add route, result : %d\n", add_result);
+       NETWORK_LOG(NETWORK_HIGH, "Add route, result : %d", add_result);
 
        if (add_result)
                Error = NET_ERR_NONE;
@@ -226,7 +226,7 @@ static int __net_remove_route_entry(const char *ip_addr, const char *interface,
                        NETCONFIG_NETWORK_INTERFACE, "RemoveRoute", params, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route");
                goto done;
        }
 
@@ -234,7 +234,7 @@ static int __net_remove_route_entry(const char *ip_addr, const char *interface,
        gboolean remove_result = FALSE;
 
        g_variant_get(message, "(b)", &remove_result);
-       NETWORK_LOG(NETWORK_HIGH, "Remove route, result : %d\n", remove_result);
+       NETWORK_LOG(NETWORK_HIGH, "Remove route, result : %d", remove_result);
 
        if (remove_result)
                Error = NET_ERR_NONE;
@@ -269,7 +269,7 @@ static int __net_add_route_ipv6(const char *ip_addr, const char *interface, int
                        NETCONFIG_NETWORK_INTERFACE, "AddRoute", params, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to add route\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to add route");
                goto done;
        }
 
@@ -277,7 +277,7 @@ static int __net_add_route_ipv6(const char *ip_addr, const char *interface, int
        gboolean add_result = FALSE;
 
        g_variant_get(message, "(b)", &add_result);
-       NETWORK_LOG(NETWORK_HIGH, "Add route, result : %d\n", add_result);
+       NETWORK_LOG(NETWORK_HIGH, "Add route, result : %d", add_result);
 
        if (add_result)
                Error = NET_ERR_NONE;
@@ -312,7 +312,7 @@ static int __net_remove_route_ipv6(const char *ip_addr, const char *interface, i
                        NETCONFIG_NETWORK_INTERFACE, "RemoveRoute", params, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route");
                goto done;
        }
 
@@ -320,7 +320,7 @@ static int __net_remove_route_ipv6(const char *ip_addr, const char *interface, i
        gboolean remove_result = FALSE;
 
        g_variant_get(message, "(b)", &remove_result);
-       NETWORK_LOG(NETWORK_HIGH, "Remove route, result : %d\n", remove_result);
+       NETWORK_LOG(NETWORK_HIGH, "Remove route, result : %d", remove_result);
 
        if (remove_result)
                Error = NET_ERR_NONE;
@@ -1093,7 +1093,7 @@ EXPORT_API int net_remove_route(const char *ip_addr, const char *interface, int
        net_err_t Error = NET_ERR_NONE;
 
        if (ip_addr == NULL || strlen(ip_addr) < 7 || interface == NULL || strlen(interface) == 0) {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid parameter\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid parameter");
 
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
@@ -1101,7 +1101,7 @@ EXPORT_API int net_remove_route(const char *ip_addr, const char *interface, int
 
        Error = __net_remove_route(ip_addr, interface, address_family);
        if (Error != NET_ERR_NONE) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route. Error [%s]\n",
+               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route. Error [%s]",
                                _net_print_error(Error));
 
                return Error;
@@ -1136,7 +1136,7 @@ EXPORT_API int net_remove_route_entry(const char *ip_addr, const char *interface
        net_err_t Error = NET_ERR_NONE;
 
        if (ip_addr == NULL || strlen(ip_addr) < 7 || interface == NULL || gateway == NULL || strlen(interface) == 0) {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid parameter\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid parameter");
 
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
@@ -1144,7 +1144,7 @@ EXPORT_API int net_remove_route_entry(const char *ip_addr, const char *interface
 
        Error = __net_remove_route_entry(ip_addr, interface, address_family, gateway);
        if (Error != NET_ERR_NONE) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route. Error [%s]\n",
+               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route. Error [%s]",
                                _net_print_error(Error));
 
                return Error;
@@ -1180,7 +1180,7 @@ EXPORT_API int net_remove_route_ipv6(const char *ip_addr, const char *interface,
        net_err_t Error = NET_ERR_NONE;
 
        if (ip_addr == NULL || strlen(ip_addr) < 3 || interface == NULL || gateway == NULL || strlen(interface) == 0) {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid parameter\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid parameter");
 
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
@@ -1188,7 +1188,7 @@ EXPORT_API int net_remove_route_ipv6(const char *ip_addr, const char *interface,
 
        Error = __net_remove_route_ipv6(ip_addr, interface, address_family, gateway);
        if (Error != NET_ERR_NONE) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route. Error [%s]\n",
+               NETWORK_LOG(NETWORK_ERROR, "Failed to remove route. Error [%s]",
                                _net_print_error(Error));
 
                return Error;
@@ -1215,7 +1215,7 @@ EXPORT_API int net_get_ethernet_cable_state(int *state)
        Error = _net_dbus_get_ethernet_cable_state(state);
 
        if (Error != NET_ERR_NONE)
-               NETWORK_LOG(NETWORK_ERROR, "_net_dbus_get_ethernet_cable_state failed\n");
+               NETWORK_LOG(NETWORK_ERROR, "_net_dbus_get_ethernet_cable_state failed");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
index 6e4f2c1..0db361f 100755 (executable)
@@ -921,7 +921,7 @@ int _net_dbus_get_wifi_state(char **wifi_state)
        const char *method = "GetWifiState";
 
        if (NULL == wifi_state) {
-                       NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter\n");
+                       NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter");
                        __NETWORK_FUNC_EXIT__;
                        return NET_ERR_INVALID_PARAM;
        }
@@ -931,7 +931,7 @@ int _net_dbus_get_wifi_state(char **wifi_state)
                        NETCONFIG_WIFI_INTERFACE, method, NULL, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to get wifi state\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to get wifi state");
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
@@ -1100,7 +1100,7 @@ int _net_dbus_get_ethernet_cable_state(int *state)
        GVariant *message = NULL;
 
        if (state == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -1109,13 +1109,13 @@ int _net_dbus_get_ethernet_cable_state(int *state)
                        NETCONFIG_NETWORK_INTERFACE, "EthernetCableState", NULL, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to get Ethernet Module State\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to get Ethernet Module State");
                return Error;
        }
 
        g_variant_get(message, "(i)", state);
 
-       NETWORK_LOG(NETWORK_LOW, "Ethernet Cable State [%d]\n", *state);
+       NETWORK_LOG(NETWORK_LOW, "Ethernet Cable State [%d]", *state);
 
        g_variant_unref(message);
 
@@ -1370,7 +1370,7 @@ int _net_dbus_connect_service(const net_wifi_connect_service_info_t *wifi_connec
        for (i = 0; i < profile_count; i++) {
                if (g_strstr_len(profile_info[i].ProfileName,
                                NET_PROFILE_NAME_LEN_MAX+1, grp_name) != NULL) {
-                       NETWORK_LOG(NETWORK_ERROR, "Found profile %s",
+                       NETWORK_LOG(NETWORK_HIGH, "Found profile %s",
                                        profile_info[i].ProfileName);
 
                        if (profile_info[i].ProfileState == NET_STATE_TYPE_READY ||
@@ -1491,7 +1491,7 @@ int _net_dbus_set_profile_ipv4(net_profile_info_t* prof_info, char* profile_name
        else if (prof_info->profile_type == NET_DEVICE_ETHERNET)
                profile_net_info = &(prof_info->ProfileInfo.Ethernet.net_info);
        else {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid Profile Type\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid Profile Type");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -1556,7 +1556,7 @@ int _net_dbus_set_profile_ipv4(net_profile_info_t* prof_info, char* profile_name
        }
 
        g_variant_unref(message);
-       NETWORK_LOG(NETWORK_HIGH, "Successfully configured IPv4.Configuration\n");
+       NETWORK_LOG(NETWORK_HIGH, "Successfully configured IPv4.Configuration");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
@@ -1590,7 +1590,7 @@ int _net_dbus_set_profile_ipv6(net_profile_info_t* prof_info, char* profile_name
        net_dev_info_t *profile_net_info  = NULL;
 
        if ((prof_info == NULL) || (profile_name == NULL) || (strlen(profile_name) == 0)) {
-               NETWORK_LOG(NETWORK_ERROR,  "Error!!! Invalid argument\n");
+               NETWORK_LOG(NETWORK_ERROR,  "Error!!! Invalid argument");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -1600,7 +1600,7 @@ int _net_dbus_set_profile_ipv6(net_profile_info_t* prof_info, char* profile_name
        else if (prof_info->profile_type == NET_DEVICE_ETHERNET)
                profile_net_info = &(prof_info->ProfileInfo.Ethernet.net_info);
        else {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid Profile Type\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid Profile Type");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -1612,7 +1612,7 @@ int _net_dbus_set_profile_ipv6(net_profile_info_t* prof_info, char* profile_name
        prefix_length = profile_net_info->PrefixLen6;
 
        NETWORK_LOG(NETWORK_HIGH, "ipaddress : %s, prefix_len : %d, gateway :"
-                       " %s\n", ip6_ptr, prefix_length, gw6_ptr);
+                       " %s", ip6_ptr, prefix_length, gw6_ptr);
 
        builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
 
@@ -1627,7 +1627,7 @@ int _net_dbus_set_profile_ipv6(net_profile_info_t* prof_info, char* profile_name
                g_variant_builder_add(builder, "{sv}", prop_method,
                                g_variant_new_string(off_method));
 
-               NETWORK_LOG(NETWORK_HIGH, "DBus Message 2/2: %s %s\n",
+               NETWORK_LOG(NETWORK_HIGH, "DBus Message 2/2: %s %s",
                                prop_method, off_method);
        } else if (profile_net_info->IpConfigType6 == NET_IP_CONFIG_TYPE_STATIC) {
 
@@ -1648,11 +1648,11 @@ int _net_dbus_set_profile_ipv6(net_profile_info_t* prof_info, char* profile_name
                                        g_variant_new_string(gw6_ptr));
                }
                NETWORK_LOG(NETWORK_HIGH, "DBus Message 2/2: %s %s %s %s %s %d"
-                               " %s %s\n", prop_method, manual_method,
+                               " %s %s", prop_method, manual_method,
                                prop_address, ipaddr6, prop_prefixlen,
                                prefix_length, prop_gateway, gwaddr6);
        } else {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid argument\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid argument");
                g_variant_builder_unref(builder);
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
@@ -1672,7 +1672,7 @@ int _net_dbus_set_profile_ipv6(net_profile_info_t* prof_info, char* profile_name
        }
 
        g_variant_unref(message);
-       NETWORK_LOG(NETWORK_HIGH, "Successfully configured IPv6.Configuration\n");
+       NETWORK_LOG(NETWORK_HIGH, "Successfully configured IPv6.Configuration");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
@@ -1712,12 +1712,12 @@ int _net_dbus_set_profile_dns(net_profile_info_t* prof_info, char* profile_name)
        else if (prof_info->profile_type == NET_DEVICE_ETHERNET)
                profile_net_info = &(prof_info->ProfileInfo.Ethernet.net_info);
        else {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid Profile Type\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid Profile Type");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
        if (profile_net_info->DnsCount > NET_DNS_ADDR_MAX) {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid parameter\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -1767,7 +1767,7 @@ int _net_dbus_set_profile_dns(net_profile_info_t* prof_info, char* profile_name)
                        g_variant_builder_add(builder, "s",
                                        dhcp_method);
 
-               NETWORK_LOG(NETWORK_HIGH, "IPv4 DnsConfigType: %d\n", profile_net_info->DnsConfigType);
+               NETWORK_LOG(NETWORK_HIGH, "IPv4 DnsConfigType: %d", profile_net_info->DnsConfigType);
 
                if (profile_net_info->DnsConfigType6 ==
                                NET_DNS_CONFIG_TYPE_STATIC)
@@ -1778,7 +1778,7 @@ int _net_dbus_set_profile_dns(net_profile_info_t* prof_info, char* profile_name)
                        g_variant_builder_add(builder, "s",
                                        ipv6_dhcp_method);
 
-               NETWORK_LOG(NETWORK_HIGH, "IPv6 DnsConfigType: %d\n", profile_net_info->DnsConfigType6);
+               NETWORK_LOG(NETWORK_HIGH, "IPv6 DnsConfigType: %d", profile_net_info->DnsConfigType6);
 
                for (i = 0; i < profile_net_info->DnsCount; i++) {
                        if (profile_net_info->DnsConfigType ==
@@ -1789,7 +1789,7 @@ int _net_dbus_set_profile_dns(net_profile_info_t* prof_info, char* profile_name)
                                g_variant_builder_add(builder, "s",
                                                dns_address[i]);
                        }
-                       NETWORK_LOG(NETWORK_HIGH, "IPv4 DNS Address added in g_variant: %s\n", dns_address[i]);
+                       NETWORK_LOG(NETWORK_HIGH, "IPv4 DNS Address added in g_variant: %s", dns_address[i]);
                }
 
                for (i = 0; i < profile_net_info->DnsCount6; i++) {
@@ -1801,7 +1801,7 @@ int _net_dbus_set_profile_dns(net_profile_info_t* prof_info, char* profile_name)
                                g_variant_builder_add(builder, "s",
                                                ipv6_dns_address[i]);
                        }
-                       NETWORK_LOG(NETWORK_HIGH, "IPv6 DNS Address added in g_variant: %s\n", ipv6_dns_address[i]);
+                       NETWORK_LOG(NETWORK_HIGH, "IPv6 DNS Address added in g_variant: %s", ipv6_dns_address[i]);
                }
 
                params = g_variant_new("(sv)", prop_nameserver_configuration, g_variant_builder_end(builder));
@@ -1816,7 +1816,7 @@ int _net_dbus_set_profile_dns(net_profile_info_t* prof_info, char* profile_name)
                        __NETWORK_FUNC_EXIT__;
                        return Error;
                }
-               NETWORK_LOG(NETWORK_HIGH, "Successfully configured Nameservers.Configuration\n");
+               NETWORK_LOG(NETWORK_HIGH, "Successfully configured Nameservers.Configuration");
                g_variant_unref(message);
        }
 
@@ -1860,7 +1860,7 @@ int _net_dbus_set_proxy(net_profile_info_t* prof_info, char* profile_name)
        else if (prof_info->profile_type == NET_DEVICE_ETHERNET)
                profile_net_info = &(prof_info->ProfileInfo.Ethernet.net_info);
        else {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid Profile Type\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid Profile Type");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -1909,7 +1909,7 @@ int _net_dbus_set_proxy(net_profile_info_t* prof_info, char* profile_name)
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
-       NETWORK_LOG(NETWORK_HIGH, "Successfully configured Proxy.Configuration\n");
+       NETWORK_LOG(NETWORK_HIGH, "Successfully configured Proxy.Configuration");
        g_variant_unref(message);
 
        __NETWORK_FUNC_EXIT__;
@@ -2374,7 +2374,7 @@ static void __net_wps_cancel_reply(GObject *source_object,
 {
        __NETWORK_FUNC_ENTER__;
 
-       NETWORK_LOG(NETWORK_LOW, "__net_wps_cancel_wifi_reply() called\n");
+       NETWORK_LOG(NETWORK_LOW, "__net_wps_cancel_wifi_reply() called");
 
        GDBusConnection *conn = NULL;
        GVariant *dbus_result = NULL;
@@ -2384,7 +2384,7 @@ static void __net_wps_cancel_reply(GObject *source_object,
        dbus_result = g_dbus_connection_call_finish(conn, res, &error);
 
        if (error != NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "error msg - [%s]\n", error->message);
+               NETWORK_LOG(NETWORK_ERROR, "error msg - [%s]", error->message);
                g_error_free(error);
        }
 
@@ -2464,11 +2464,11 @@ static void __net_wps_connect_wifi_reply(GObject *source_object,
        dbus_result = g_dbus_connection_call_finish(conn, res, &error);
 
        if (error != NULL) {
-               NETWORK_LOG(NETWORK_HIGH, "error msg - [%s]\n", error->message);
+               NETWORK_LOG(NETWORK_HIGH, "error msg - [%s]", error->message);
                Error = __net_error_string_to_enum(error->message);
                g_error_free(error);
        } else
-               NETWORK_LOG(NETWORK_LOW, "error msg is NULL\n");
+               NETWORK_LOG(NETWORK_LOW, "error msg is NULL");
 
        if (dbus_result)
                g_variant_unref(dbus_result);
@@ -2476,14 +2476,14 @@ static void __net_wps_connect_wifi_reply(GObject *source_object,
        if (Error == NET_ERR_NONE)
                goto done;
 
-       NETWORK_LOG(NETWORK_ERROR, "Connection open failed. Error [%d]\n", Error);
+       NETWORK_LOG(NETWORK_ERROR, "Connection open failed. Error [%d]", Error);
 
        memset(wps_info, 0, sizeof(network_request_table_t));
 
        event_data.Error = Error;
        event_data.Event = NET_EVENT_WIFI_WPS_RSP;
 
-       NETWORK_LOG(NETWORK_HIGH, "Sending NET_EVENT_WIFI_WPS_RSP Error = %s\n",
+       NETWORK_LOG(NETWORK_HIGH, "Sending NET_EVENT_WIFI_WPS_RSP Error = %s",
                        _net_print_error(event_data.Error));
 
        callback_flag = TRUE;
@@ -2544,11 +2544,11 @@ int _net_dbus_set_agent_wps_pbc(void)
 
        ret_val = __net_dbus_set_agent_field(NETCONFIG_AGENT_FIELD_WPS_PBC, "enable");
        if (NET_ERR_NONE != ret_val) {
-               NETWORK_LOG(NETWORK_ERROR, "__net_dbus_set_agent_field failed. Error = %d \n", ret_val);
+               NETWORK_LOG(NETWORK_ERROR, "__net_dbus_set_agent_field failed. Error = %d ", ret_val);
                return ret_val;
        }
 
-       NETWORK_LOG(NETWORK_HIGH, "Successfully sent wps pbc\n");
+       NETWORK_LOG(NETWORK_HIGH, "Successfully sent wps pbc");
 
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
@@ -2561,17 +2561,17 @@ int _net_dbus_set_agent_wps_pin(const char *wps_pin)
        int ret_val;
 
        if (NULL == wps_pin || strlen(wps_pin) <= 0) {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid param \n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid param ");
                return NET_ERR_INVALID_PARAM;
        }
 
        ret_val = __net_dbus_set_agent_field(NETCONFIG_AGENT_FIELD_WPS_PIN, wps_pin);
        if (NET_ERR_NONE != ret_val) {
-               NETWORK_LOG(NETWORK_ERROR, "__net_dbus_set_agent_field failed. Error = %d \n", ret_val);
+               NETWORK_LOG(NETWORK_ERROR, "__net_dbus_set_agent_field failed. Error = %d ", ret_val);
                return ret_val;
        }
 
-       NETWORK_LOG(NETWORK_HIGH, "Successfully sent wps pin\n");
+       NETWORK_LOG(NETWORK_HIGH, "Successfully sent wps pin");
 
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
@@ -2595,14 +2595,14 @@ int _net_dbus_tdls_disconnect(const char* peer_mac_addr)
                        NETCONFIG_WIFI_INTERFACE, method, params, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to TDLS Disconnect Request\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to TDLS Disconnect Request");
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
 
        g_variant_get(message, "(i)", &ret);
 
-       NETWORK_LOG(NETWORK_HIGH, "Status [%d]\n", ret);
+       NETWORK_LOG(NETWORK_HIGH, "Status [%d]", ret);
 
        if (ret)
                Error = NET_ERR_NONE;
@@ -2626,7 +2626,7 @@ int _net_dbus_tdls_connected_peer(char** peer_mac_addr)
 
 
        if (NULL == peer_mac_addr) {
-                       NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter\n");
+                       NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter");
                        __NETWORK_FUNC_EXIT__;
                        return NET_ERR_INVALID_PARAM;
        }
@@ -2636,14 +2636,14 @@ int _net_dbus_tdls_connected_peer(char** peer_mac_addr)
                        NETCONFIG_WIFI_INTERFACE, method, NULL, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to Get Peer Connected Mac address\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to Get Peer Connected Mac address");
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
 
        g_variant_get(message, "(s)", peer_mac_addr);
 
-       NETWORK_LOG(NETWORK_HIGH, "TDLS Peer Mac address [%s]\n", *peer_mac_addr);
+       NETWORK_LOG(NETWORK_HIGH, "TDLS Peer Mac address [%s]", *peer_mac_addr);
 
        g_variant_unref(message);
        __NETWORK_FUNC_EXIT__;
@@ -2659,7 +2659,7 @@ int _net_dbus_device_policy_get_wifi(int *state)
        GVariant *message = NULL;
 
        if (state == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -2668,13 +2668,13 @@ int _net_dbus_device_policy_get_wifi(int *state)
                        NETCONFIG_NETWORK_INTERFACE, "DevicePolicyGetWifi", NULL, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to get wifi device policy\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to get wifi device policy");
                return Error;
        }
 
        g_variant_get(message, "(i)", state);
 
-       NETWORK_LOG(NETWORK_LOW, "Wifi device policy state [%d]\n", *state);
+       NETWORK_LOG(NETWORK_LOW, "Wifi device policy state [%d]", *state);
 
        g_variant_unref(message);
 
@@ -2690,7 +2690,7 @@ int _net_dbus_device_policy_get_wifi_profile(int *state)
        GVariant *message = NULL;
 
        if (state == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -2699,13 +2699,13 @@ int _net_dbus_device_policy_get_wifi_profile(int *state)
                        NETCONFIG_NETWORK_INTERFACE, "DevicePolicyGetWifiProfile", NULL, &Error);
 
        if (message == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "Failed to get wifi device policy\n");
+               NETWORK_LOG(NETWORK_ERROR, "Failed to get wifi device policy");
                return Error;
        }
 
        g_variant_get(message, "(i)", state);
 
-       NETWORK_LOG(NETWORK_LOW, "Wifi profile device policy state [%d]\n", *state);
+       NETWORK_LOG(NETWORK_LOW, "Wifi profile device policy state [%d]", *state);
 
        g_variant_unref(message);
 
index d46c518..2e4855e 100755 (executable)
@@ -491,7 +491,7 @@ static int __net_extract_mobile_services(GVariantIter *iter,
 
        if (NET_SERVICE_INTERNET <= network_type &&
                        network_type <= NET_SERVICE_TETHERING) {
-               NETWORK_LOG(NETWORK_ERROR, "Service type %d", network_type);
+               NETWORK_LOG(NETWORK_HIGH, "Service type %d", network_type);
        } else {
                NETWORK_LOG(NETWORK_ERROR, "Invalid service type %d", network_type);
                __NETWORK_FUNC_EXIT__;
@@ -2160,7 +2160,7 @@ static int __net_modify_ethernet_profile(const char* ProfileName,
                Error = _net_dbus_set_profile_ipv4(ProfInfo, profilePath);
 
                if (Error != NET_ERR_NONE) {
-                       NETWORK_LOG(NETWORK_ERROR, "Failed to set IPv4\n");
+                       NETWORK_LOG(NETWORK_ERROR, "Failed to set IPv4");
 
                        __NETWORK_FUNC_EXIT__;
                        return Error;
@@ -2184,7 +2184,7 @@ static int __net_modify_ethernet_profile(const char* ProfileName,
                                NETPM_IPV4_STR_LEN_MAX+1);
 
                        NETWORK_LOG(NETWORK_HIGH, "IPv4 DNS Addr order: %d, old:"
-                               "%s, new: %s\n", i, old_dns, new_dns);
+                               "%s, new: %s", i, old_dns, new_dns);
 
                        if (net_info->DnsAddr[i].Data.Ipv4.s_addr !=
                                ex_net_info->DnsAddr[i].Data.Ipv4.s_addr)
@@ -2208,8 +2208,8 @@ static int __net_modify_ethernet_profile(const char* ProfileName,
                                        ipaddr6_old, INET6_ADDRSTRLEN);
                        inet_ntop(AF_INET6, &net_info->DnsAddr6[j].Data.Ipv6,
                                        ipaddr6_new, INET6_ADDRSTRLEN);
-                       NETWORK_LOG(NETWORK_ERROR, "IPv6 DNS Addr order: %d, "
-                                       "old: %s, new: %s\n", j, ipaddr6_old,
+                       NETWORK_LOG(NETWORK_HIGH, "IPv6 DNS Addr order: %d, "
+                                       "old: %s, new: %s", j, ipaddr6_old,
                                        ipaddr6_new);
 
                        if (net_info->DnsAddr6[j].Data.Ipv6.s6_addr !=
@@ -2224,7 +2224,7 @@ static int __net_modify_ethernet_profile(const char* ProfileName,
                Error = _net_dbus_set_profile_dns(ProfInfo, profilePath);
 
                if (Error != NET_ERR_NONE) {
-                       NETWORK_LOG(NETWORK_ERROR, "Failed to set DNS\n");
+                       NETWORK_LOG(NETWORK_ERROR, "Failed to set DNS");
 
                        __NETWORK_FUNC_EXIT__;
                        return Error;
@@ -2571,7 +2571,7 @@ static int __net_convert_string_to_ipv6_string(char *str, char **ip_address)
 
        *ip_address = (char *)malloc(INET6_ADDRSTRLEN);
        if (NULL == *ip_address) {
-               NETWORK_LOG(NETWORK_ERROR, "Malloc Failed\n");
+               NETWORK_LOG(NETWORK_ERROR, "Malloc Failed");
                return NET_ERR_INVALID_OPERATION;
        }
 
@@ -2600,19 +2600,19 @@ EXPORT_API int net_reset_profile(int type, int sim_id)
        __NETWORK_FUNC_ENTER__;
 
        if (NetworkInfo.ref_count < 1) {
-               NETWORK_LOG(NETWORK_ERROR, "Application is not registered\n");
+               NETWORK_LOG(NETWORK_ERROR, "Application is not registered");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_APP_NOT_REGISTERED;
        }
 
        if (request_table[NETWORK_REQUEST_TYPE_RESET_DEFAULT].flag == TRUE) {
-               NETWORK_LOG(NETWORK_ERROR, "Error!! Request already in progress\n");
+               NETWORK_LOG(NETWORK_ERROR, "Error!! Request already in progress");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_IN_PROGRESS;
        }
 
        if (_net_dbus_is_pending_call_used() == TRUE) {
-               NETWORK_LOG(NETWORK_ERROR, "Error!! pending call already in progress\n");
+               NETWORK_LOG(NETWORK_ERROR, "Error!! pending call already in progress");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_IN_PROGRESS;
        }
@@ -2622,7 +2622,7 @@ EXPORT_API int net_reset_profile(int type, int sim_id)
        Error = __net_telephony_reset_profile(type, sim_id);
        if (Error != NET_ERR_NONE) {
                NETWORK_LOG(NETWORK_ERROR,
-                       "Failed to reset service(profile). Error [%s]\n",
+                       "Failed to reset service(profile). Error [%s]",
                        _net_print_error(Error));
                memset(&request_table[NETWORK_REQUEST_TYPE_RESET_DEFAULT],
                                        0, sizeof(network_request_table_t));
@@ -2684,7 +2684,7 @@ EXPORT_API int net_delete_profile(const char* profile_name)
                return NET_ERR_APP_NOT_REGISTERED;
        }
 
-       NETWORK_LOG(NETWORK_ERROR, "Delete Profile [%s]", profile_name);
+       NETWORK_LOG(NETWORK_HIGH, "Delete Profile [%s]", profile_name);
 
        if (_net_check_profile_name(profile_name) != NET_ERR_NONE) {
                NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter");
@@ -2816,7 +2816,7 @@ EXPORT_API int net_modify_profile(const char* profile_name, net_profile_info_t*
            (exProfInfo.profile_type != NET_DEVICE_WIFI &&
             exProfInfo.profile_type != NET_DEVICE_CELLULAR &&
             exProfInfo.profile_type != NET_DEVICE_ETHERNET)) {
-               NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter\n");
+               NETWORK_LOG(NETWORK_ERROR, "Invalid Parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -3024,7 +3024,7 @@ EXPORT_API int net_foreach_ipv6_address(net_device_t device_type,
 
        fp = fopen(NET_IPV6_ADDRESS_FILE, "r");
        if (NULL == fp) {
-               NETWORK_LOG(NETWORK_ERROR, "File Opening Failed\n");
+               NETWORK_LOG(NETWORK_ERROR, "File Opening Failed");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_OPERATION;
        }
index 71aa77a..41ba754 100755 (executable)
@@ -632,28 +632,28 @@ EXPORT_API int net_wifi_cancel_wps(void)
        __NETWORK_FUNC_ENTER__;
 
        net_err_t Error = NET_ERR_NONE;
-       NETWORK_LOG(NETWORK_ERROR, "net_wifi_wps_cancel called\n");
+       NETWORK_LOG(NETWORK_ERROR, "net_wifi_wps_cancel called");
 
        if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               NETWORK_LOG(NETWORK_ERROR, "Application is not registered\n");
+               NETWORK_LOG(NETWORK_ERROR, "Application is not registered");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_APP_NOT_REGISTERED;
        }
 
        if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == FALSE) {
-               NETWORK_LOG(NETWORK_ERROR, "No pending call in progress\n");
+               NETWORK_LOG(NETWORK_ERROR, "No pending call in progress");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_OPERATION;
        }
 
        if (_net_get_wifi_state(&Error) != WIFI_ON) {
-               NETWORK_LOG(NETWORK_ERROR, "Wi-Fi is powered off!\n");
+               NETWORK_LOG(NETWORK_ERROR, "Wi-Fi is powered off!");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_OPERATION;
        }
 
        if (_net_dbus_is_pending_call_used() == TRUE) {
-               NETWORK_LOG(NETWORK_ERROR, "pending call in progress\n");
+               NETWORK_LOG(NETWORK_ERROR, "pending call in progress");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_OPERATION;
        }
@@ -664,7 +664,7 @@ EXPORT_API int net_wifi_cancel_wps(void)
        Error = _net_dbus_cancel_wps();
        if (Error != NET_ERR_NONE) {
                NETWORK_LOG(NETWORK_ERROR,
-                       "Failed to request cancel WPS, Error [%s]\n",
+                       "Failed to request cancel WPS, Error [%s]",
                        _net_print_error(Error));
        }
 
@@ -767,25 +767,25 @@ EXPORT_API int net_wifi_enroll_wps_without_ssid(net_wifi_wps_info_t *wps_info)
        net_err_t Error = NET_ERR_NONE;
 
        if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               NETWORK_LOG(NETWORK_ERROR, "Application is not registered\n");
+               NETWORK_LOG(NETWORK_ERROR, "Application is not registered");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_APP_NOT_REGISTERED;
        }
 
        if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE) {
-               NETWORK_LOG(NETWORK_ERROR, "Request in progress\n");
+               NETWORK_LOG(NETWORK_ERROR, "Request in progress");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_IN_PROGRESS;
        }
 
        if (_net_get_wifi_state(&Error) != WIFI_ON) {
-               NETWORK_LOG(NETWORK_ERROR, "Wi-Fi is powered off!\n");
+               NETWORK_LOG(NETWORK_ERROR, "Wi-Fi is powered off!");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_OPERATION;
        }
 
        if (_net_dbus_is_pending_call_used() == TRUE) {
-               NETWORK_LOG(NETWORK_ERROR, "pending call in progress\n");
+               NETWORK_LOG(NETWORK_ERROR, "pending call in progress");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_OPERATION;
        }
@@ -797,7 +797,7 @@ EXPORT_API int net_wifi_enroll_wps_without_ssid(net_wifi_wps_info_t *wps_info)
                Error = _net_dbus_set_agent_wps_pbc();
                if (NET_ERR_NONE != Error) {
                        NETWORK_LOG(NETWORK_ERROR,
-                               "_net_dbus_set_agent_wps_pbc() failed\n");
+                               "_net_dbus_set_agent_wps_pbc() failed");
                        __NETWORK_FUNC_EXIT__;
                        return NET_ERR_INVALID_OPERATION;
                }
@@ -805,7 +805,7 @@ EXPORT_API int net_wifi_enroll_wps_without_ssid(net_wifi_wps_info_t *wps_info)
                Error = _net_dbus_set_agent_wps_pin(wps_info->pin);
                if (NET_ERR_NONE != Error) {
                        NETWORK_LOG(NETWORK_ERROR,
-                                       "_net_dbus_set_agent_wps_pin() failed\n");
+                                       "_net_dbus_set_agent_wps_pin() failed");
                        __NETWORK_FUNC_EXIT__;
                        return NET_ERR_INVALID_OPERATION;
                }
@@ -825,7 +825,7 @@ EXPORT_API int net_wifi_enroll_wps_without_ssid(net_wifi_wps_info_t *wps_info)
 
        if (Error != NET_ERR_NONE) {
                NETWORK_LOG(NETWORK_ERROR,
-                               "Failed to request open connection, Error [%s]\n",
+                               "Failed to request open connection, Error [%s]",
                                _net_print_error(Error));
 
                memset(&request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS], 0,
@@ -843,13 +843,13 @@ EXPORT_API int net_wifi_tdls_disconnect(const char* peer_mac_addr)
        net_err_t Error = NET_ERR_NONE;
 
        if (peer_mac_addr == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "invalid parameter\n");
+               NETWORK_LOG(NETWORK_ERROR, "invalid parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
        if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               NETWORK_LOG(NETWORK_ERROR, "Application is not registered\n");
+               NETWORK_LOG(NETWORK_ERROR, "Application is not registered");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_APP_NOT_REGISTERED;
        }
@@ -857,7 +857,7 @@ EXPORT_API int net_wifi_tdls_disconnect(const char* peer_mac_addr)
        Error = _net_dbus_tdls_disconnect(peer_mac_addr);
 
        if (Error != NET_ERR_NONE)
-               NETWORK_LOG(NETWORK_ERROR, "_net_dbus_tdls_set_device_type failed\n");
+               NETWORK_LOG(NETWORK_ERROR, "_net_dbus_tdls_set_device_type failed");
 
 
        __NETWORK_FUNC_EXIT__;
@@ -872,13 +872,13 @@ EXPORT_API int net_wifi_tdls_connected_peer(char** peer_mac_addr)
        net_err_t Error = NET_ERR_NONE;
 
        if (peer_mac_addr == NULL) {
-               NETWORK_LOG(NETWORK_ERROR, "invalid parameter\n");
+               NETWORK_LOG(NETWORK_ERROR, "invalid parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
        if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               NETWORK_LOG(NETWORK_ERROR, "Application is not registered\n");
+               NETWORK_LOG(NETWORK_ERROR, "Application is not registered");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_APP_NOT_REGISTERED;
        }
@@ -886,7 +886,7 @@ EXPORT_API int net_wifi_tdls_connected_peer(char** peer_mac_addr)
        Error = _net_dbus_tdls_connected_peer(peer_mac_addr);
 
        if (Error != NET_ERR_NONE)
-               NETWORK_LOG(NETWORK_ERROR, "net_wifi_tdls_connected_peer failed\n");
+               NETWORK_LOG(NETWORK_ERROR, "net_wifi_tdls_connected_peer failed");
 
 
        __NETWORK_FUNC_EXIT__;
@@ -902,12 +902,12 @@ EXPORT_API int net_get_device_policy_wifi(void)
        if (state == -1) {
                net_err_t Error = _net_dbus_device_policy_get_wifi(&state);
                if (Error != NET_ERR_NONE)
-                       NETWORK_LOG(NETWORK_ERROR, "_net_dbus_device_policy_get_wifi failed\n");
+                       NETWORK_LOG(NETWORK_ERROR, "_net_dbus_device_policy_get_wifi failed");
                else
                        _net_set_dpm_wifi_state(state);
        }
 
-       NETWORK_LOG(NETWORK_LOW, "Wifi device policy state [%d]\n", state);
+       NETWORK_LOG(NETWORK_LOW, "Wifi device policy state [%d]", state);
 
        __NETWORK_FUNC_EXIT__;
        return state;
@@ -921,7 +921,7 @@ EXPORT_API int net_get_device_policy_wifi_profile(void)
        if (state == -1) {
                net_err_t Error = _net_dbus_device_policy_get_wifi_profile(&state);
                if (Error != NET_ERR_NONE)
-                       NETWORK_LOG(NETWORK_ERROR, "_net_dbus_device_policy_get_wifi_profile failed\n");
+                       NETWORK_LOG(NETWORK_ERROR, "_net_dbus_device_policy_get_wifi_profile failed");
                else
                        _net_set_dpm_wifi_profile_state(state);
        }