return NULL;
}
+ del234(sftp_requests, req);
+
return req;
}
return req;
}
-char *fxp_realpath_recv(struct sftp_packet *pktin)
+char *fxp_realpath_recv(struct sftp_packet *pktin, struct sftp_request *req)
{
+ sfree(req);
+
if (pktin->type == SSH_FXP_NAME) {
int count;
char *path;
return req;
}
-struct fxp_handle *fxp_open_recv(struct sftp_packet *pktin)
+struct fxp_handle *fxp_open_recv(struct sftp_packet *pktin,
+ struct sftp_request *req)
{
+ sfree(req);
+
if (pktin->type == SSH_FXP_HANDLE) {
char *hstring;
struct fxp_handle *handle;
return req;
}
-struct fxp_handle *fxp_opendir_recv(struct sftp_packet *pktin)
+struct fxp_handle *fxp_opendir_recv(struct sftp_packet *pktin,
+ struct sftp_request *req)
{
+ sfree(req);
if (pktin->type == SSH_FXP_HANDLE) {
char *hstring;
struct fxp_handle *handle;
return req;
}
-void fxp_close_recv(struct sftp_packet *pktin)
+void fxp_close_recv(struct sftp_packet *pktin, struct sftp_request *req)
{
+ sfree(req);
fxp_got_status(pktin);
sftp_pkt_free(pktin);
}
return req;
}
-int fxp_mkdir_recv(struct sftp_packet *pktin)
+int fxp_mkdir_recv(struct sftp_packet *pktin, struct sftp_request *req)
{
- int id = fxp_got_status(pktin);
+ int id;
+ sfree(req);
+ id = fxp_got_status(pktin);
sftp_pkt_free(pktin);
if (id != 1) {
return 0;
return req;
}
-int fxp_rmdir_recv(struct sftp_packet *pktin)
+int fxp_rmdir_recv(struct sftp_packet *pktin, struct sftp_request *req)
{
- int id = fxp_got_status(pktin);
+ int id;
+ sfree(req);
+ id = fxp_got_status(pktin);
sftp_pkt_free(pktin);
if (id != 1) {
return 0;
return req;
}
-int fxp_remove_recv(struct sftp_packet *pktin)
+int fxp_remove_recv(struct sftp_packet *pktin, struct sftp_request *req)
{
- int id = fxp_got_status(pktin);
+ int id;
+ sfree(req);
+ id = fxp_got_status(pktin);
sftp_pkt_free(pktin);
if (id != 1) {
return 0;
return req;
}
-int fxp_rename_recv(struct sftp_packet *pktin)
+int fxp_rename_recv(struct sftp_packet *pktin, struct sftp_request *req)
{
- int id = fxp_got_status(pktin);
+ int id;
+ sfree(req);
+ id = fxp_got_status(pktin);
sftp_pkt_free(pktin);
if (id != 1) {
return 0;
return req;
}
-int fxp_stat_recv(struct sftp_packet *pktin, struct fxp_attrs *attrs)
+int fxp_stat_recv(struct sftp_packet *pktin, struct sftp_request *req,
+ struct fxp_attrs *attrs)
{
+ sfree(req);
if (pktin->type == SSH_FXP_ATTRS) {
*attrs = sftp_pkt_getattrs(pktin);
sftp_pkt_free(pktin);
return req;
}
-int fxp_fstat_recv(struct sftp_packet *pktin,
+int fxp_fstat_recv(struct sftp_packet *pktin, struct sftp_request *req,
struct fxp_attrs *attrs)
{
+ sfree(req);
if (pktin->type == SSH_FXP_ATTRS) {
*attrs = sftp_pkt_getattrs(pktin);
sftp_pkt_free(pktin);
return req;
}
-int fxp_setstat_recv(struct sftp_packet *pktin)
+int fxp_setstat_recv(struct sftp_packet *pktin, struct sftp_request *req)
{
- int id = fxp_got_status(pktin);
+ int id;
+ sfree(req);
+ id = fxp_got_status(pktin);
sftp_pkt_free(pktin);
if (id != 1) {
return 0;
return req;
}
-int fxp_fsetstat_recv(struct sftp_packet *pktin)
+int fxp_fsetstat_recv(struct sftp_packet *pktin, struct sftp_request *req)
{
- int id = fxp_got_status(pktin);
+ int id;
+ sfree(req);
+ id = fxp_got_status(pktin);
sftp_pkt_free(pktin);
if (id != 1) {
return 0;
return req;
}
-int fxp_read_recv(struct sftp_packet *pktin, char *buffer, int len)
+int fxp_read_recv(struct sftp_packet *pktin, struct sftp_request *req,
+ char *buffer, int len)
{
+ sfree(req);
if (pktin->type == SSH_FXP_DATA) {
char *str;
int rlen;
return req;
}
-struct fxp_names *fxp_readdir_recv(struct sftp_packet *pktin)
+struct fxp_names *fxp_readdir_recv(struct sftp_packet *pktin,
+ struct sftp_request *req)
{
+ sfree(req);
if (pktin->type == SSH_FXP_NAME) {
struct fxp_names *ret;
int i;
return req;
}
-int fxp_write_recv(struct sftp_packet *pktin)
+int fxp_write_recv(struct sftp_packet *pktin, struct sftp_request *req)
{
+ sfree(req);
fxp_got_status(pktin);
sftp_pkt_free(pktin);
return fxp_errtype == SSH_FX_OK;