break;
}
+ /* Read operation */
+ server->fs->fs->sftp_read(server->fs->fs_context, sftp,
+ handle, offset, len,
+ silc_sftp_server_data, SILC_32_TO_PTR(id));
+
/* Call monitor */
if (server->monitors & SILC_SFTP_MONITOR_READ && server->monitor) {
mdata.offset = offset;
(*server->monitor)(sftp, SILC_SFTP_MONITOR_READ, &mdata,
server->monitor_context);
}
-
- /* Read operation */
- server->fs->fs->sftp_read(server->fs->fs_context, sftp,
- handle, offset, len,
- silc_sftp_server_data, SILC_32_TO_PTR(id));
}
break;
break;
}
+ /* Write operation */
+ server->fs->fs->sftp_write(server->fs->fs_context, sftp, handle, offset,
+ (const unsigned char *)data, data_len,
+ silc_sftp_server_status, SILC_32_TO_PTR(id));
+
/* Call monitor */
if (server->monitors & SILC_SFTP_MONITOR_WRITE && server->monitor) {
mdata.offset = offset;
(*server->monitor)(sftp, SILC_SFTP_MONITOR_WRITE, &mdata,
server->monitor_context);
}
-
- /* Write operation */
- server->fs->fs->sftp_write(server->fs->fs_context, sftp, handle, offset,
- (const unsigned char *)data, data_len,
- silc_sftp_server_status, SILC_32_TO_PTR(id));
}
break;