summaryrefslogtreecommitdiff
path: root/src/core/net-nonblock.c
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2018-03-31 13:04:35 +0200
committerGitHub <noreply@github.com>2018-03-31 13:04:35 +0200
commit0c1db8f2aee4aa5040a16518adb71f57dc953985 (patch)
tree4c51838a1b7aa278727b9de7f3b1663120b75e62 /src/core/net-nonblock.c
parent9fa8c32b9e2f80e308d1ed780490f6d2dfd6bb05 (diff)
parent0b2f5b0a1e30932b07245c508a673eb0e9b6ab37 (diff)
downloadirssi-0c1db8f2aee4aa5040a16518adb71f57dc953985.zip
Merge pull request #854 from irssi/ahf/otr
OTR support, take 2
Diffstat (limited to 'src/core/net-nonblock.c')
-rw-r--r--src/core/net-nonblock.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/core/net-nonblock.c b/src/core/net-nonblock.c
index d6e767b6..94c53e74 100644
--- a/src/core/net-nonblock.c
+++ b/src/core/net-nonblock.c
@@ -35,41 +35,6 @@ typedef struct {
int tag;
} SIMPLE_THREAD_REC;
-static int g_io_channel_write_block(GIOChannel *channel, void *data, int len)
-{
- gsize ret;
- int sent;
- GIOStatus status;
-
- sent = 0;
- do {
- status = g_io_channel_write_chars(channel, (char *) data + sent,
- len-sent, &ret, NULL);
- sent += ret;
- } while (sent < len && status != G_IO_STATUS_ERROR);
-
- return sent < len ? -1 : 0;
-}
-
-static int g_io_channel_read_block(GIOChannel *channel, void *data, int len)
-{
- time_t maxwait;
- gsize ret;
- int received;
- GIOStatus status;
-
- maxwait = time(NULL)+2;
- received = 0;
- do {
- status = g_io_channel_read_chars(channel, (char *) data + received,
- len-received, &ret, NULL);
- received += ret;
- } while (received < len && time(NULL) < maxwait &&
- status != G_IO_STATUS_ERROR && status != G_IO_STATUS_EOF);
-
- return received < len ? -1 : 0;
-}
-
/* nonblocking gethostbyname(), ip (IPADDR) + error (int, 0 = not error) is
written to pipe when found PID of the resolver child is returned */
int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe,