Skip to content
This repository was archived by the owner on Aug 23, 2024. It is now read-only.

Commit 1d46107

Browse files
committed
Small bugfix in ssh module
1 parent ccf2cbc commit 1d46107

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • MicroPython_BUILD/components/micropython/esp32/libs

MicroPython_BUILD/components/micropython/esp32/libs/espcurl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ int ssh_SCP(uint8_t type, char *server, char *port, char * scppath, char *user,
11101110
// ** Upload a file via SCP
11111111
rc = sshUpload(channel, fdd, hdr, hdrlen);
11121112
if (fdd != NULL) {
1113-
if (rc) sprintf(body, "Uploaded file %s", fname);
1113+
if (rc == 0) sprintf(body, "Uploaded file %s", fname);
11141114
else sprintf(body, "Error uploading file %s", fname);
11151115
}
11161116
}
@@ -1131,7 +1131,7 @@ int ssh_SCP(uint8_t type, char *server, char *port, char * scppath, char *user,
11311131
// ** Download a file via SCP
11321132
rc = sshDownload(channel, &fileinfo, fdd, hdr, body, hdrlen, bodylen);
11331133
if (fdd != NULL) {
1134-
if (rc) sprintf(body, "Downloaded file %s", fname);
1134+
if (rc == 0) sprintf(body, "Downloaded file %s", fname);
11351135
else sprintf(body, "Error downloading file %s", fname);
11361136
}
11371137
}

0 commit comments

Comments
 (0)