aboutsummaryrefslogtreecommitdiff
path: root/src/sftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sftp.c')
-rw-r--r--src/sftp.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/sftp.c b/src/sftp.c
index 73b1f301..a4670384 100644
--- a/src/sftp.c
+++ b/src/sftp.c
@@ -217,11 +217,11 @@ int sftp_server_init(sftp_session sftp){
return -1;
}
- ssh_log(session, SSH_LOG_PACKET, "Received SSH_FXP_INIT");
+ SSH_LOG(SSH_LOG_PACKET, "Received SSH_FXP_INIT");
buffer_get_u32(packet->payload, &version);
version = ntohl(version);
- ssh_log(session, SSH_LOG_PACKET, "Client version: %d", version);
+ SSH_LOG(SSH_LOG_PACKET, "Client version: %d", version);
sftp->client_version = version;
sftp_packet_free(packet);
@@ -244,7 +244,7 @@ int sftp_server_init(sftp_session sftp){
}
ssh_buffer_free(reply);
- ssh_log(session, SSH_LOG_RARE, "Server version sent");
+ SSH_LOG(SSH_LOG_RARE, "Server version sent");
if (version > LIBSFTP_VERSION) {
sftp->version = LIBSFTP_VERSION;
@@ -302,7 +302,7 @@ int sftp_packet_write(sftp_session sftp, uint8_t type, ssh_buffer payload){
if (size < 0) {
return -1;
} else if((uint32_t) size != buffer_get_rest_len(payload)) {
- ssh_log(sftp->session, SSH_LOG_PACKET,
+ SSH_LOG(SSH_LOG_PACKET,
"Had to write %d bytes, wrote only %d",
buffer_get_rest_len(payload),
size);
@@ -450,7 +450,7 @@ static sftp_message sftp_get_message(sftp_packet packet) {
return NULL;
}
- ssh_log(packet->sftp->session, SSH_LOG_PACKET,
+ SSH_LOG(SSH_LOG_PACKET,
"Packet with id %d type %d",
msg->id,
msg->packet_type);
@@ -539,7 +539,7 @@ int sftp_init(sftp_session sftp) {
/* TODO: are we sure there are 4 bytes ready? */
buffer_get_u32(packet->payload, &version);
version = ntohl(version);
- ssh_log(sftp->session, SSH_LOG_RARE,
+ SSH_LOG(SSH_LOG_RARE,
"SFTP server version %d",
version);
@@ -564,7 +564,7 @@ int sftp_init(sftp_session sftp) {
ssh_string_free(ext_data_s);
return -1;
}
- ssh_log(sftp->session, SSH_LOG_RARE,
+ SSH_LOG(SSH_LOG_RARE,
"SFTP server extension: %s, version: %s",
ext_name, ext_data);
@@ -705,7 +705,7 @@ static int sftp_enqueue(sftp_session sftp, sftp_message msg) {
return -1;
}
- ssh_log(sftp->session, SSH_LOG_PACKET,
+ SSH_LOG(SSH_LOG_PACKET,
"Queued msg type %d id %d",
msg->id, msg->packet_type);
@@ -746,7 +746,7 @@ static sftp_message sftp_dequeue(sftp_session sftp, uint32_t id){
}
msg = queue->message;
request_queue_free(queue);
- ssh_log(sftp->session, SSH_LOG_PACKET,
+ SSH_LOG(SSH_LOG_PACKET,
"Dequeued msg id %d type %d",
msg->id,
msg->packet_type);
@@ -1222,7 +1222,7 @@ static sftp_attributes sftp_parse_attr_3(sftp_session sftp, ssh_buffer buf,
break;
}
- ssh_log(sftp->session, SSH_LOG_RARE, "Name: %s", attr->name);
+ SSH_LOG(SSH_LOG_RARE, "Name: %s", attr->name);
longname = buffer_get_ssh_string(buf);
if (longname == NULL) {
@@ -1253,7 +1253,7 @@ static sftp_attributes sftp_parse_attr_3(sftp_session sftp, ssh_buffer buf,
}
flags = ntohl(flags);
attr->flags = flags;
- ssh_log(sftp->session, SSH_LOG_RARE,
+ SSH_LOG(SSH_LOG_RARE,
"Flags: %.8lx\n", (long unsigned int) flags);
if (flags & SSH_FILEXFER_ATTR_SIZE) {
@@ -1261,7 +1261,7 @@ static sftp_attributes sftp_parse_attr_3(sftp_session sftp, ssh_buffer buf,
break;
}
attr->size = ntohll(attr->size);
- ssh_log(sftp->session, SSH_LOG_RARE,
+ SSH_LOG(SSH_LOG_RARE,
"Size: %llu\n",
(long long unsigned int) attr->size);
}
@@ -1450,7 +1450,7 @@ sftp_attributes sftp_readdir(sftp_session sftp, sftp_dir dir) {
}
ssh_buffer_free(payload);
- ssh_log(sftp->session, SSH_LOG_PACKET,
+ SSH_LOG(SSH_LOG_PACKET,
"Sent a ssh_fxp_readdir with id %d", id);
while (msg == NULL) {
@@ -1507,7 +1507,7 @@ sftp_attributes sftp_readdir(sftp_session sftp, sftp_dir dir) {
return NULL;
}
- ssh_log(sftp->session, SSH_LOG_RARE, "Count is %d", dir->count);
+ SSH_LOG(SSH_LOG_RARE, "Count is %d", dir->count);
attr = sftp_parse_attr(sftp, dir->buffer, 1);
if (attr == NULL) {
@@ -1683,7 +1683,7 @@ sftp_file sftp_open(sftp_session sftp, const char *file, int flags,
sftp_flags |= SSH_FXF_TRUNC;
if (flags & O_EXCL)
sftp_flags |= SSH_FXF_EXCL;
- ssh_log(sftp->session,SSH_LOG_PACKET,"Opening file %s with sftp flags %x",file,sftp_flags);
+ SSH_LOG(SSH_LOG_PACKET,"Opening file %s with sftp flags %x",file,sftp_flags);
id = sftp_get_new_id(sftp);
if (buffer_add_u32(buffer, id) < 0 ||
buffer_add_ssh_string(buffer, filename) < 0) {
@@ -2002,7 +2002,7 @@ ssize_t sftp_write(sftp_file file, const void *buf, size_t count) {
if (len < 0) {
return -1;
} else if (len != packetlen) {
- ssh_log(sftp->session, SSH_LOG_PACKET,
+ SSH_LOG(SSH_LOG_PACKET,
"Could not write as much data as expected");
}