diff --git a/src/xmppipe.h b/src/xmppipe.h index bf9974c..d287be5 100644 --- a/src/xmppipe.h +++ b/src/xmppipe.h @@ -136,7 +136,6 @@ char *xmppipe_fmt_encode(const char *); char *xmppipe_nfmt_encode(const char *, size_t); char *xmppipe_fmt_decode(const char *); char *xmppipe_nfmt_decode(const char *, size_t); -int xmppipe_set_nonblock(int fd); char *xmppipe_resource(void); char *xmppipe_servername(const char *); diff --git a/src/xmppipe_event.c b/src/xmppipe_event.c index 6ea39db..e5c3154 100644 --- a/src/xmppipe_event.c +++ b/src/xmppipe_event.c @@ -25,9 +25,6 @@ void event_loop(xmppipe_state_t *state) { int eof = 0; char *buf; - if (xmppipe_set_nonblock(fd) < 0) - return; - buf = xmppipe_calloc(state->bufsz, 1); for (;;) { diff --git a/src/xmppipe_util.c b/src/xmppipe_util.c index 5bad731..6c47ef4 100644 --- a/src/xmppipe_util.c +++ b/src/xmppipe_util.c @@ -38,19 +38,6 @@ const char *const xmppipe_states[] = {"XMPPIPE_S_DISCONNECTED", static char *xmppipe_join(const char *prefix, const char *delimiter, const char *suffix); -int xmppipe_set_nonblock(int fd) { - int flags; - - flags = fcntl(fd, F_GETFD); - if (flags < 0) - return -1; - - if (fcntl(fd, F_SETFD, flags | O_NONBLOCK) < 0) - return -1; - - return 0; -} - char *xmppipe_getenv(const char *s) { char *p = getenv(s);