1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-03 22:13:11 +03:00

fix comments, moved to htonu64 function to sftp.c and made it static

This commit is contained in:
Daniel Stenberg
2009-03-27 07:03:00 +00:00
parent 9df891e412
commit f390c8e02d
5 changed files with 22 additions and 25 deletions

View File

@@ -83,6 +83,24 @@
/* S_IFDIR */
#define LIBSSH2_SFTP_ATTR_PFILETYPE_DIR 0040000
/* libssh2_htonu64
*/
static void
_libssh2_htonu64(unsigned char *buf, libssh2_uint64_t value)
{
unsigned long msl = ((libssh2_uint64_t)value >> 32);
buf[0] = (msl >> 24) & 0xFF;
buf[1] = (msl >> 16) & 0xFF;
buf[2] = (msl >> 8) & 0xFF;
buf[3] = msl & 0xFF;
buf[4] = (value >> 24) & 0xFF;
buf[5] = (value >> 16) & 0xFF;
buf[6] = (value >> 8) & 0xFF;
buf[7] = value & 0xFF;
}
/*
* sftp_packet_add
*