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).
This commit is contained in:
16
source/dcc.c
16
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"))
|
||||
|
||||
Reference in New Issue
Block a user