sftp-client.c (204917) | sftp-client.c (215116) |
---|---|
1/* $OpenBSD: sftp-client.c,v 1.90 2009/10/11 10:41:26 dtucker Exp $ */ | 1/* $OpenBSD: sftp-client.c,v 1.92 2010/07/19 03:16:33 djm Exp $ */ |
2/* 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 698 unchanged lines hidden (view full) --- 708 709 if (id != expected_id) 710 fatal("ID mismatch (%u != %u)", id, expected_id); 711 712 if (type == SSH2_FXP_STATUS) { 713 u_int status = buffer_get_int(&msg); 714 715 error("Couldn't canonicalise: %s", fx2txt(status)); | 2/* 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 698 unchanged lines hidden (view full) --- 708 709 if (id != expected_id) 710 fatal("ID mismatch (%u != %u)", id, expected_id); 711 712 if (type == SSH2_FXP_STATUS) { 713 u_int status = buffer_get_int(&msg); 714 715 error("Couldn't canonicalise: %s", fx2txt(status)); |
716 return(NULL); | 716 buffer_free(&msg); 717 return NULL; |
717 } else if (type != SSH2_FXP_NAME) 718 fatal("Expected SSH2_FXP_NAME(%u) packet, got %u", 719 SSH2_FXP_NAME, type); 720 721 count = buffer_get_int(&msg); 722 if (count != 1) 723 fatal("Got multiple names (%d) from SSH_FXP_REALPATH", count); 724 --- 792 unchanged lines hidden (view full) --- 1517 strerror(errno)); 1518 ret = -1; 1519 } else if (S_ISDIR(sb.st_mode)) { 1520 if (strcmp(filename, ".") == 0 || 1521 strcmp(filename, "..") == 0) 1522 continue; 1523 1524 if (upload_dir_internal(conn, new_src, new_dst, | 718 } else if (type != SSH2_FXP_NAME) 719 fatal("Expected SSH2_FXP_NAME(%u) packet, got %u", 720 SSH2_FXP_NAME, type); 721 722 count = buffer_get_int(&msg); 723 if (count != 1) 724 fatal("Got multiple names (%d) from SSH_FXP_REALPATH", count); 725 --- 792 unchanged lines hidden (view full) --- 1518 strerror(errno)); 1519 ret = -1; 1520 } else if (S_ISDIR(sb.st_mode)) { 1521 if (strcmp(filename, ".") == 0 || 1522 strcmp(filename, "..") == 0) 1523 continue; 1524 1525 if (upload_dir_internal(conn, new_src, new_dst, |
1525 pflag, depth + 1, printflag) == -1) | 1526 pflag, printflag, depth + 1) == -1) |
1526 ret = -1; 1527 } else if (S_ISREG(sb.st_mode)) { 1528 if (do_upload(conn, new_src, new_dst, pflag) == -1) { 1529 error("Uploading of file %s to %s failed!", 1530 new_src, new_dst); 1531 ret = -1; 1532 } 1533 } else --- 43 unchanged lines hidden --- | 1527 ret = -1; 1528 } else if (S_ISREG(sb.st_mode)) { 1529 if (do_upload(conn, new_src, new_dst, pflag) == -1) { 1530 error("Uploading of file %s to %s failed!", 1531 new_src, new_dst); 1532 ret = -1; 1533 } 1534 } else --- 43 unchanged lines hidden --- |