View | Details | Raw Unified | Return to bug 1365
Collapse All | Expand All

(-)openssh-4.6p1/sftp.c (-2 / +8 lines)
Lines 1260-1266 interactive_loop(int fd_in, int fd_out, Link Here
1260
	char *dir = NULL;
1260
	char *dir = NULL;
1261
	char cmd[2048];
1261
	char cmd[2048];
1262
	struct sftp_conn *conn;
1262
	struct sftp_conn *conn;
1263
	int err, interactive;
1263
	int err, interactive, prt=1;
1264
	EditLine *el = NULL;
1264
	EditLine *el = NULL;
1265
#ifdef USE_LIBEDIT
1265
#ifdef USE_LIBEDIT
1266
	History *hl = NULL;
1266
	History *hl = NULL;
Lines 1336-1348 interactive_loop(int fd_in, int fd_out, Link Here
1336
		signal(SIGINT, SIG_IGN);
1336
		signal(SIGINT, SIG_IGN);
1337
1337
1338
		if (el == NULL) {
1338
		if (el == NULL) {
1339
			if (interactive)
1339
			if (interactive && prt)
1340
				printf("sftp> ");
1340
				printf("sftp> ");
1341
			if (fgets(cmd, sizeof(cmd), infile) == NULL) {
1341
			if (fgets(cmd, sizeof(cmd), infile) == NULL) {
1342
				if (errno == EAGAIN) {
1343
					prt = 0;
1344
					usleep(10*1000);
1345
					continue;
1346
				}	
1342
				if (interactive)
1347
				if (interactive)
1343
					printf("\n");
1348
					printf("\n");
1344
				break;
1349
				break;
1345
			}
1350
			}
1351
			prt = 1;
1346
			if (!interactive) { /* Echo command */
1352
			if (!interactive) { /* Echo command */
1347
				printf("sftp> %s", cmd);
1353
				printf("sftp> %s", cmd);
1348
				if (strlen(cmd) > 0 &&
1354
				if (strlen(cmd) > 0 &&

Return to bug 1365