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:
parent
725ccc249d
commit
c1e214367d
@ -24,6 +24,7 @@
|
||||
#include "commands.h"
|
||||
#include "pidwait.h"
|
||||
#include "line-split.h"
|
||||
#include "network.h"
|
||||
#include "net-sendbuffer.h"
|
||||
#include "misc.h"
|
||||
#include "levels.h"
|
||||
@ -350,16 +351,11 @@ static void sig_exec_input_reader(PROCESS_REC *rec)
|
||||
{
|
||||
char tmpbuf[512], *str;
|
||||
gsize recvlen;
|
||||
int err, ret;
|
||||
int ret;
|
||||
|
||||
g_return_if_fail(rec != NULL);
|
||||
|
||||
recvlen = 0;
|
||||
err = g_io_channel_read(rec->in, tmpbuf,
|
||||
sizeof(tmpbuf), &recvlen);
|
||||
if (err != 0 && err != G_IO_ERROR_AGAIN && errno != EINTR)
|
||||
recvlen = -1;
|
||||
|
||||
recvlen = net_receive(rec->in, tmpbuf, sizeof(tmpbuf));
|
||||
do {
|
||||
ret = line_split(tmpbuf, recvlen, &str, &rec->databuf);
|
||||
if (ret == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user