summaryrefslogtreecommitdiff
path: root/src/irc/dcc/dcc.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-09-12 12:19:59 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-09-12 12:19:59 +0000
commit20e26554cd216d07d59617059d13ab576ff86724 (patch)
tree454cdb63c5aad65e4c406fb75cdc272b8d1c09d8 /src/irc/dcc/dcc.c
parent50eae89a96586a537d7b876377726e8ac0eadc4e (diff)
downloadirssi-20e26554cd216d07d59617059d13ab576ff86724.zip
The new /SET dcc_port range didn't work properly..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1795 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/dcc/dcc.c')
-rw-r--r--src/irc/dcc/dcc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/irc/dcc/dcc.c b/src/irc/dcc/dcc.c
index 8a15b72c..d44c2d62 100644
--- a/src/irc/dcc/dcc.c
+++ b/src/irc/dcc/dcc.c
@@ -193,7 +193,7 @@ void dcc_str2ip(const char *str, IPADDR *ip)
GIOChannel *dcc_listen(GIOChannel *iface, IPADDR *ip, int *port)
{
GIOChannel *handle;
- const char *dcc_port;
+ const char *dcc_port, *p;
int first, last;
if (net_getsockname(iface, ip, NULL) == -1)
@@ -209,8 +209,10 @@ GIOChannel *dcc_listen(GIOChannel *iface, IPADDR *ip, int *port)
}
/* get last port */
- dcc_port = strchr(dcc_port, ' ');
- if (dcc_port == NULL) dcc_port = strchr(dcc_port, '-');
+ p = strchr(dcc_port, ' ');
+ if (p == NULL) p = strchr(dcc_port, '-');
+
+ dcc_port = p;
if (dcc_port == NULL)
last = first;
else {