summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
75374b2)
if (pr->hostname[1] != 1 || pr->hostname[2] != 0) {
/* Not CONNECT or reserved field nonzero - error */
reply[1] = 1; /* generic failure */
if (pr->hostname[1] != 1 || pr->hostname[2] != 0) {
/* Not CONNECT or reserved field nonzero - error */
reply[1] = 1; /* generic failure */
- sk_write(pr->s, reply, lenof(reply));
+ sk_write(pr->s, (char *) reply, lenof(reply));
pfd_close(pr->s);
return 1;
}
pfd_close(pr->s);
return 1;
}
pr->port = GET_16BIT_MSB_FIRST(pr->hostname+4+alen);
if (atype == 1) {
/* REP=0 (success) already */
pr->port = GET_16BIT_MSB_FIRST(pr->hostname+4+alen);
if (atype == 1) {
/* REP=0 (success) already */
- sk_write(pr->s, reply, lenof(reply));
+ sk_write(pr->s, (char *) reply, lenof(reply));
sprintf(pr->hostname, "%d.%d.%d.%d",
(unsigned char)pr->hostname[4],
(unsigned char)pr->hostname[5],
sprintf(pr->hostname, "%d.%d.%d.%d",
(unsigned char)pr->hostname[4],
(unsigned char)pr->hostname[5],
goto connect;
} else if (atype == 3) {
/* REP=0 (success) already */
goto connect;
} else if (atype == 3) {
/* REP=0 (success) already */
- sk_write(pr->s, reply, lenof(reply));
+ sk_write(pr->s, (char *) reply, lenof(reply));
memmove(pr->hostname, pr->hostname + 5, alen-1);
pr->hostname[alen-1] = '\0';
goto connect;
memmove(pr->hostname, pr->hostname + 5, alen-1);
pr->hostname[alen-1] = '\0';
goto connect;
* Unknown address type. (FIXME: support IPv6!)
*/
reply[1] = 8; /* atype not supported */
* Unknown address type. (FIXME: support IPv6!)
*/
reply[1] = 8; /* atype not supported */
- sk_write(pr->s, reply, lenof(reply));
+ sk_write(pr->s, (char *) reply, lenof(reply));
/*
* If we get here without either having done `continue'
* or `goto connect', it must be because there is no
/*
* If we get here without either having done `continue'
* or `goto connect', it must be because there is no
}
int sftp_senddata(char *buf, int len)
{
}
int sftp_senddata(char *buf, int len)
{
- back->send(backhandle, (unsigned char *) buf, len);
+ back->send(backhandle, buf, len);
if (back != NULL && back->socket(backhandle) != NULL) {
char ch;
back->special(backhandle, TS_EOF);
if (back != NULL && back->socket(backhandle) != NULL) {
char ch;
back->special(backhandle, TS_EOF);
+ ssh_scp_recv((unsigned char *) &ch, 1);
pct = (int) (100 * (done * 1.0 / size));
if (gui_mode) {
pct = (int) (100 * (done * 1.0 / size));
if (gui_mode) {
- gui_update_stats(name, size, pct, elap, done, eta,
+ gui_update_stats(name, size, pct, elap, done, eta,
(unsigned long) ratebs);
} else {
len = printf("\r%-25.25s | %10ld kB | %5.1f kB/s | ETA: %8s | %3d%%",
(unsigned long) ratebs);
} else {
len = printf("\r%-25.25s | %10ld kB | %5.1f kB/s | ETA: %8s | %3d%%",
char ch, resp, rbuf[2048];
int p;
char ch, resp, rbuf[2048];
int p;
- if (ssh_scp_recv(&resp, 1) <= 0)
+ if (ssh_scp_recv((unsigned char *) &resp, 1) <= 0)
bump("Lost connection");
p = 0;
bump("Lost connection");
p = 0;
case 1: /* error */
case 2: /* fatal error */
do {
case 1: /* error */
case 2: /* fatal error */
do {
- if (ssh_scp_recv(&ch, 1) <= 0)
+ if (ssh_scp_recv((unsigned char *) &ch, 1) <= 0)
bump("Protocol error: Lost connection");
rbuf[p++] = ch;
} while (p < sizeof(rbuf) && ch != '\n');
bump("Protocol error: Lost connection");
rbuf[p++] = ch;
} while (p < sizeof(rbuf) && ch != '\n');
int sftp_recvdata(char *buf, int len)
{
int sftp_recvdata(char *buf, int len)
{
- return ssh_scp_recv(buf, len);
+ return ssh_scp_recv((unsigned char *) buf, len);
}
int sftp_senddata(char *buf, int len)
{
}
int sftp_senddata(char *buf, int len)
{
- back->send(backhandle, (unsigned char *) buf, len);
+ back->send(backhandle, buf, len);
bufsize = 0;
while (!done) {
bufsize = 0;
while (!done) {
- if (ssh_scp_recv(&ch, 1) <= 0)
+ if (ssh_scp_recv((unsigned char *) &ch, 1) <= 0)
return 1;
if (ch == '\n')
bump("Protocol error: Unexpected newline");
i = 0;
action = ch;
do {
return 1;
if (ch == '\n')
bump("Protocol error: Unexpected newline");
i = 0;
action = ch;
do {
- if (ssh_scp_recv(&ch, 1) <= 0)
+ if (ssh_scp_recv((unsigned char *) &ch, 1) <= 0)
bump("Lost connection");
if (i >= bufsize) {
bufsize = i + 128;
bump("Lost connection");
if (i >= bufsize) {
bufsize = i + 128;
return actuallen;
} else {
return actuallen;
} else {
- return ssh_scp_recv(data, len);
+ return ssh_scp_recv((unsigned char *) data, len);
if (using_sftp) {
scp_sftp_listdir(src);
} else {
if (using_sftp) {
scp_sftp_listdir(src);
} else {
- while (ssh_scp_recv(&c, 1) > 0)
+ while (ssh_scp_recv((unsigned char *) &c, 1) > 0)
tell_char(stdout, c);
}
}
tell_char(stdout, c);
}
}
if (back != NULL && back->socket(backhandle) != NULL) {
char ch;
back->special(backhandle, TS_EOF);
if (back != NULL && back->socket(backhandle) != NULL) {
char ch;
back->special(backhandle, TS_EOF);
+ ssh_scp_recv((unsigned char *) &ch, 1);
memset(&isa, 0, sizeof(struct sockaddr_in));
err = 0;
memset(&isa, 0, sizeof(struct sockaddr_in));
err = 0;
- t = accept(s->s,(struct sockaddr *)&isa,&addrlen);
+ t = accept(s->s,(struct sockaddr *)&isa,(socklen_t *) &addrlen);