diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-05-22 22:38:29 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-05-22 22:38:29 +0000 |
commit | f053542dcfd1739152c57eede2b882894911ca48 (patch) | |
tree | ec5f8f8b4a0c78d0dd5dcb76847a29e329de0d1f /src/irc/proxy/listen.c | |
parent | 9f99376a8ac3d86d09bb5358753df2c3eaca5cae (diff) | |
download | irssi-f053542dcfd1739152c57eede2b882894911ca48.zip |
Extend net_sendbuffer by adding a LINEBUF_REC member and a net_sendbuffer_receive_line
function to read linewise from the associated io channel.
Rewrite irc/dcc/proxy read logic on top of it.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4841 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/proxy/listen.c')
-rw-r--r-- | src/irc/proxy/listen.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/irc/proxy/listen.c b/src/irc/proxy/listen.c index 9c9fb43f..5e7497c1 100644 --- a/src/irc/proxy/listen.c +++ b/src/irc/proxy/listen.c @@ -50,7 +50,6 @@ static void remove_client(CLIENT_REC *rec) g_free(rec->proxy_address); net_sendbuffer_destroy(rec->handle, TRUE); g_source_remove(rec->recv_tag); - line_split_free(rec->buffer); g_free_not_null(rec->nick); g_free_not_null(rec->host); g_free(rec); @@ -296,14 +295,13 @@ static void handle_client_cmd(CLIENT_REC *client, char *cmd, char *args, static void sig_listen_client(CLIENT_REC *client) { - char tmpbuf[1024], *str, *cmd, *args; - int ret, recvlen; + char *str, *cmd, *args; + int ret; g_return_if_fail(client != NULL); while (g_slist_find(proxy_clients, client) != NULL) { - recvlen = net_receive(client->handle->handle, tmpbuf, sizeof(tmpbuf)); - ret = line_split(tmpbuf, recvlen, &str, &client->buffer); + ret = net_sendbuffer_receive_line(client->handle, &str, 1); if (ret == -1) { /* connection lost */ remove_client(client); |