Fix the bracket properly 78/86478/2 accepted/tizen/common/20160901.143653 accepted/tizen/ivi/20160902.042351 accepted/tizen/mobile/20160902.042301 accepted/tizen/tv/20160902.042317 accepted/tizen/wearable/20160902.042333 submit/tizen/20160901.122216
authorhyunuktak <hyunuk.tak@samsung.com>
Thu, 1 Sep 2016 10:06:26 +0000 (19:06 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Thu, 1 Sep 2016 10:22:33 +0000 (19:22 +0900)
Change-Id: I001c6e3069f10e668840e401c7b09d09b2b97597
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/net-config.spec
src/wifi-power.c

index 0aba72d..330d86e 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          net-config
 Summary:       TIZEN Network Configuration service
-Version:       1.1.85
+Version:       1.1.86
 Release:       2
 Group:         System/Network
 License:       Apache-2.0
index 5705b69..0b23f24 100755 (executable)
@@ -1083,9 +1083,9 @@ static int __netconfig_get_random_mac(unsigned char *mac_buf, int mac_len)
 
 void __netconfig_set_ether_macaddr()
 {
-
        DBG("Set wired Mac address ");
        char *mac_addr = NULL;
+       char rand_addr[WLAN_MAC_ADDR_MAX];
        int rv = -1;
 
        mac_addr = vconf_get_str(VCONF_ETH_MAC_ADDRESS);
@@ -1099,7 +1099,7 @@ void __netconfig_set_ether_macaddr()
                /*Generate the Random Mac address*/
                unsigned char rand_mac_add[ETH_MAC_ADDR_SIZE+1];
 
-               if (__netconfig_get_random_mac(rand_mac_add, ETH_MAC_ADDR_SIZE == -1)) {
+               if (__netconfig_get_random_mac(rand_mac_add, ETH_MAC_ADDR_SIZE) == -1) {
 
                        ERR("Could not generate the Random Mac address");
                        g_free(mac_addr);
@@ -1110,18 +1110,18 @@ void __netconfig_set_ether_macaddr()
                rand_mac_add[0] |= 0x02; /*set local assignment bit*/
 
                /*Set the Mac address in Vconf*/
-               snprintf(mac_addr, WLAN_MAC_ADDR_MAX, "%x:%x:%x:%x:%x:%x",
+               snprintf(rand_addr, WLAN_MAC_ADDR_MAX, "%x:%x:%x:%x:%x:%x",
                                rand_mac_add[0], rand_mac_add[1],
                                rand_mac_add[2], rand_mac_add[3],
                                rand_mac_add[4], rand_mac_add[5]);
 
-               netconfig_set_vconf_str(VCONF_ETH_MAC_ADDRESS, mac_addr);
+               netconfig_set_vconf_str(VCONF_ETH_MAC_ADDRESS, rand_addr);
        }
 
-       DBG("MAC Address of eth0 [%s]", mac_addr);
+       DBG("MAC Address of eth0 [%s]", rand_addr);
        const char *path = NET_EXEC_PATH;
        char *const args[] = { "/sbin/ifconfig", "eth0", "hw",
-               "ether", mac_addr, "up", NULL};
+               "ether", rand_addr, "up", NULL};
        char *const envs[] = { NULL };
        rv = netconfig_execute_file(path, args, envs);