From fe368ac875fefded3e3389035d52dea33941d0ee Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Sat, 10 Oct 2015 22:48:26 +1100 Subject: [PATCH] Fix argument order for dcc_getfile_resume_start() The last two arguments are port, then offset (as per the DCC ACCEPT CTCP command). We don't really use these anyway - port is passed to dcc_create() but for pre-existing DCC entries all that did was add it to the socketinfo, which doesn't seem to have any real effect. Also fix dcc_create() so it passes the actual remote port to add_socketread() (as above, this doesn't seem to have any real effect but is consistent with the other code). --- source/dcc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/dcc.c b/source/dcc.c index f5c0f0d..7e3f3ec 100644 --- a/source/dcc.c +++ b/source/dcc.c @@ -563,7 +563,7 @@ DCC_List *new_i; } new->remport = ntohs(new->remport); flags |= DCC_ACTIVE; - add_socketread(new_s, port, flags|type, nick, new_i->sock.func_read, NULL); + add_socketread(new_s, new->remport, flags|type, nick, new_i->sock.func_read, NULL); set_socketinfo(new_s, new); if ((getpeername(new_s, (struct sockaddr *) &remaddr, &rl)) != -1) { @@ -3423,14 +3423,14 @@ int old_dp, old_dn, old_dc; in_ctcp_flag = old_dc; } -void dcc_getfile_resume_start (char *nick, char *description, char *address, char *port) +void dcc_getfile_resume_start(char *nick, char *description, char *port, char *offset) { -SocketList *s; -DCC_int *n; -const DCC_List *pending; -char *tmp = NULL; -char *fullname = NULL; -struct stat sb; + SocketList *s; + DCC_int *n; + const DCC_List *pending; + char *tmp = NULL; + char *fullname = NULL; + struct stat sb; /* resume command has been sent and accepted. */ if (description && !strcmp(description, "file.ext"))