summaryrefslogtreecommitdiff
path: root/sock_conn.c
diff options
context:
space:
mode:
Diffstat (limited to 'sock_conn.c')
-rw-r--r--sock_conn.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sock_conn.c b/sock_conn.c
index 57a3acd..119dd10 100644
--- a/sock_conn.c
+++ b/sock_conn.c
@@ -499,6 +499,7 @@ int irc_reconnect(irc_conn *conn)
irc_conn reconn;
+ PNL();
if (conn == NULL)
{
PERM();
@@ -516,18 +517,22 @@ int irc_reconnect(irc_conn *conn)
fret = irc_open(hostname, port, &reconn);
if (fret==-1)
{
- PERM();
+ ENL();
return -1;
}
if (-1 == irc_read_timeout(&reconn, timeout))
{
- PERM();
+ ENL();
}
//BUG lets think about this case deeper
//free(hostname);
//free(port);
+ PNL();
+
+ memcpy(conn, &reconn, sizeof(irc_conn));
+
return 0;
}