1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Use net_receive in sig_exec_input_reader.

git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4973 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-12-30 01:20:09 +00:00 committed by exg
parent 725ccc249d
commit c1e214367d

View File

@ -24,6 +24,7 @@
#include "commands.h" #include "commands.h"
#include "pidwait.h" #include "pidwait.h"
#include "line-split.h" #include "line-split.h"
#include "network.h"
#include "net-sendbuffer.h" #include "net-sendbuffer.h"
#include "misc.h" #include "misc.h"
#include "levels.h" #include "levels.h"
@ -350,16 +351,11 @@ static void sig_exec_input_reader(PROCESS_REC *rec)
{ {
char tmpbuf[512], *str; char tmpbuf[512], *str;
gsize recvlen; gsize recvlen;
int err, ret; int ret;
g_return_if_fail(rec != NULL); g_return_if_fail(rec != NULL);
recvlen = 0; recvlen = net_receive(rec->in, tmpbuf, sizeof(tmpbuf));
err = g_io_channel_read(rec->in, tmpbuf,
sizeof(tmpbuf), &recvlen);
if (err != 0 && err != G_IO_ERROR_AGAIN && errno != EINTR)
recvlen = -1;
do { do {
ret = line_split(tmpbuf, recvlen, &str, &rec->databuf); ret = line_split(tmpbuf, recvlen, &str, &rec->databuf);
if (ret == -1) { if (ret == -1) {