Merge "Fixed to check whether Ethernet cable state changed callback exists when it...
[platform/core/api/connection.git] / src / connection.c
index 8c49912..004ab62 100755 (executable)
@@ -385,7 +385,8 @@ static int __connection_set_ethernet_cable_state_changed_cb(connection_h connect
                                        __connection_cb_ethernet_cable_state_changed_cb);
 
        } else {
-               if (__connection_get_ethernet_cable_state_changed_callback_count() == 1)
+               if (__connection_get_ethernet_cable_state_changed_callback_count() == 1 &&
+                                 local_handle->ethernet_cable_state_changed_callback)
                        _connection_libnet_set_ethernet_cable_state_changed_cb(NULL);
        }
 
@@ -628,7 +629,7 @@ EXPORT_API int connection_get_mac_address(connection_h connection, connection_ty
 
                break;
        //LCOV_EXCL_STOP
-       default :
+       default:
                CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
                return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }