BT_ERR("IO Channel read is failed with %d", status);
g_free(buffer);
- if (err) {
- BT_ERR("IO Channel read error [%s]", err->message);
- if (status == G_IO_STATUS_ERROR &&
- __is_error_by_disconnect(err)) {
+ if (err || status == G_IO_STATUS_EOF) {
+ if (err)
+ BT_ERR("IO Channel read error [%s]", err->message);
+ if ((status == G_IO_STATUS_EOF) ||
+ (status == G_IO_STATUS_ERROR &&
+ __is_error_by_disconnect(err))) {
+
BT_ERR("cond : %d", cond);
- g_error_free(err);
+ if (err)
+ g_error_free(err);
conn_info = __get_conn_info_from_fd(info, fd);
if (conn_info == NULL) {
__rfcomm_client_disconnect(info);
return FALSE;
}
- g_error_free(err);
+ if (err)
+ g_error_free(err);
}
return TRUE;
}
return BLUETOOTH_ERROR_INVALID_PARAM;
}
- BT_DBG("FD : %d", fd);
-
retv_if(length <= 0, BLUETOOTH_ERROR_INVALID_PARAM);
switch (privilege_token) {