1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 13:26:38 +02:00

irc: fix freeze when reading on socket with SSL enabled (bug #35097)

This commit is contained in:
Sebastien Helleu
2012-06-09 11:43:02 +02:00
parent d8c9013aff
commit 9f4dbd2b3b
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -14,6 +14,7 @@ Version 0.3.9 (under dev!)
* core: escape special chars (`#[\`) in configuration files for name of options
(bug #36584)
* guile: fix path of guile include dirs in cmake build (patch #7790)
* irc: fix freeze when reading on socket with SSL enabled (bug #35097)
* irc: reallow names beginning with "#" for servers
Version 0.3.8 (2012-06-03)
+6
View File
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
@@ -2874,6 +2875,7 @@ irc_server_connect_cb (void *data, int status, int gnutls_rc,
{
struct t_irc_server *server;
const char *proxy;
int flags;
server = (struct t_irc_server *)data;
@@ -2888,6 +2890,10 @@ irc_server_connect_cb (void *data, int status, int gnutls_rc,
if (server->current_ip)
free (server->current_ip);
server->current_ip = (ip_address) ? strdup (ip_address) : NULL;
flags = fcntl (server->sock, F_GETFL);
if (flags == -1)
flags = 0;
fcntl (server->sock, F_SETFL, flags | O_NONBLOCK);
weechat_printf (server->buffer,
_("%s: connected to %s/%d (%s)"),
IRC_PLUGIN_NAME,