aboutsummaryrefslogtreecommitdiff
path: root/health
diff options
context:
space:
mode:
authorElvis Pfützenreuter <epx@signove.com>2010-10-25 14:28:43 -0200
committerJohan Hedberg <johan.hedberg@nokia.com>2010-10-25 14:48:27 -0400
commit780dd75fccf56437140d61744a7b70c5de914264 (patch)
tree2ff1652d098834263e946107737d6292c3484b6a /health
parentc1e72570fc792623f0b6e3b8f30851dd3e2ada6d (diff)
downloadbluez-780dd75fccf56437140d61744a7b70c5de914264.tar.gz
Fix fd comparison
Diffstat (limited to 'health')
-rw-r--r--health/hdp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/health/hdp.c b/health/hdp.c
index 10f4c5f7..8a2e8aa4 100644
--- a/health/hdp.c
+++ b/health/hdp.c
@@ -477,7 +477,7 @@ static void hdp_mdl_reconn_cb(struct mcap_mdl *mdl, GError *err, gpointer data)
}
fd = mcap_mdl_get_fd(dc_data->hdp_chann->mdl);
- if (fd <= 0)
+ if (fd < 0)
reply = g_dbus_create_error(dc_data->msg,
ERROR_INTERFACE ".HealthError",
"Cannot get file descriptor");
@@ -568,7 +568,7 @@ static DBusMessage *channel_acquire_continue(struct hdp_tmp_dc_data *data,
}
fd = mcap_mdl_get_fd(data->hdp_chann->mdl);
- if (fd > 0)
+ if (fd >= 0)
return g_dbus_create_reply(data->msg, DBUS_TYPE_UNIX_FD, &fd,
DBUS_TYPE_INVALID);