projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement refreshing the whole dialogue box with dlg_refresh, so that
[u/mdw/putty]
/
psftp.c
diff --git
a/psftp.c
b/psftp.c
index
904ddb8
..
4678c97
100644
(file)
--- a/
psftp.c
+++ b/
psftp.c
@@
-189,6
+189,11
@@
static int bare_name_compare(const void *av, const void *bv)
return strcmp(*a, *b);
}
return strcmp(*a, *b);
}
+static void not_connected(void)
+{
+ printf("psftp: not connected to a host; use \"open host.name\"\n");
+}
+
/* ----------------------------------------------------------------------
* The meat of the `get' and `put' commands.
*/
/* ----------------------------------------------------------------------
* The meat of the `get' and `put' commands.
*/
@@
-936,7
+941,7
@@
int sftp_cmd_quit(struct sftp_command *cmd)
int sftp_cmd_close(struct sftp_command *cmd)
{
if (back == NULL) {
int sftp_cmd_close(struct sftp_command *cmd)
{
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}
@@
-966,7
+971,7
@@
int sftp_cmd_ls(struct sftp_command *cmd)
int i;
if (back == NULL) {
int i;
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}
@@
-1088,7
+1093,7
@@
int sftp_cmd_cd(struct sftp_command *cmd)
char *dir;
if (back == NULL) {
char *dir;
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}
@@
-1131,7
+1136,7
@@
int sftp_cmd_cd(struct sftp_command *cmd)
int sftp_cmd_pwd(struct sftp_command *cmd)
{
if (back == NULL) {
int sftp_cmd_pwd(struct sftp_command *cmd)
{
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}
@@
-1155,7
+1160,7
@@
int sftp_general_get(struct sftp_command *cmd, int restart, int multiple)
int recurse = FALSE;
if (back == NULL) {
int recurse = FALSE;
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}
@@
-1269,7
+1274,7
@@
int sftp_general_put(struct sftp_command *cmd, int restart, int multiple)
int recurse = FALSE;
if (back == NULL) {
int recurse = FALSE;
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}
@@
-1370,7
+1375,7
@@
int sftp_cmd_mkdir(struct sftp_command *cmd)
int i, ret;
if (back == NULL) {
int i, ret;
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}
@@
-1431,7
+1436,7
@@
int sftp_cmd_rmdir(struct sftp_command *cmd)
int i, ret;
if (back == NULL) {
int i, ret;
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}
@@
-1473,7
+1478,7
@@
int sftp_cmd_rm(struct sftp_command *cmd)
int i, ret;
if (back == NULL) {
int i, ret;
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}
@@
-1568,7
+1573,7
@@
int sftp_cmd_mv(struct sftp_command *cmd)
int i, ret;
if (back == NULL) {
int i, ret;
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}
@@
-1662,7
+1667,7
@@
int sftp_cmd_chmod(struct sftp_command *cmd)
struct sftp_context_chmod actx, *ctx = &actx;
if (back == NULL) {
struct sftp_context_chmod actx, *ctx = &actx;
if (back == NULL) {
-
printf("psftp: not connected to a host; use \"open host.name\"\n"
);
+
not_connected(
);
return 0;
}
return 0;
}