The callback can be registered for each connection handle
and the ref count is incremented each time it is registered.
However, when the callback is released,
the ref count is decremented without checking whether or not the callback is registered in the connection handle.
Therefore, the ref count can be 0 even though there is a valid callback, and the event may not be processed.
Change-Id: I0569e8d0a74ca647c5bcdba6c877e7374a89e6f9
Name: capi-network-connection
Summary: Network Connection library in TIZEN C API
-Version: 1.0.94
+Version: 1.0.95
Release: 1
Group: System/Network
License: Apache-2.0
__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);
}
break;
//LCOV_EXCL_STOP
- default :
+ default:
CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}