diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-01-24 19:47:56 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-01-24 19:47:56 +0000 |
commit | a0aeaf15caa9e967f6be1a7b3a3087ff9122c7a9 (patch) | |
tree | fc5b35918b56238d06934aaffcdf2a9fdaa095fd /hcid | |
parent | 79e768bf14609f8f5a91a249687beac14b68687e (diff) |
Moved set_nonblocking to common/dbus.c
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/dbus-rfcomm.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/hcid/dbus-rfcomm.c b/hcid/dbus-rfcomm.c index 515a55aa..3bae204f 100644 --- a/hcid/dbus-rfcomm.c +++ b/hcid/dbus-rfcomm.c @@ -172,34 +172,6 @@ static void pending_connect_free(struct pending_connect *c) free(c); } -static int set_nonblocking(int fd, int *err) -{ - long arg; - - arg = fcntl(fd, F_GETFL); - if (arg < 0) { - if (err) - *err = errno; - error("fcntl(F_GETFL): %s (%d)", strerror(errno), errno); - return -1; - } - - /* Return if already nonblocking */ - if (arg & O_NONBLOCK) - return 0; - - arg |= O_NONBLOCK; - if (fcntl(fd, F_SETFL, arg) < 0) { - if (err) - *err = errno; - error("fcntl(F_SETFL, O_NONBLOCK): %s (%d)", - strerror(errno), errno); - return -1; - } - - return 0; -} - static int rfcomm_release(struct rfcomm_node *node, int *err) { struct rfcomm_dev_req req; |