fixed delete file after transid
This commit is contained in:
parent
9b10a7f23d
commit
b7ec9c8c35
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
/*
|
||||
{
|
||||
"transid": 623787878,
|
||||
"opertype" : 1, [1-READ, 2-DELETE, 3-WRITE]
|
||||
"part": 0, []
|
||||
"parts": 3, []
|
||||
|
|
@ -38,6 +39,7 @@
|
|||
}
|
||||
*/
|
||||
|
||||
|
||||
#define READ_ORERATION 1
|
||||
#define DELETE_ORERATION 2
|
||||
#define WRITE_ORERATION 3
|
||||
|
|
@ -73,7 +75,7 @@ esp_err_t ParseBlockDataObject(char *argres, cb_blockdata_transfer_t *ft)
|
|||
else
|
||||
{
|
||||
ft->transid = trans;
|
||||
ESP_LOGI(TAG, "New transaction with id %d", ft->transid);
|
||||
//ESP_LOGI(TAG, "New transaction with id %d", ft->transid);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -213,6 +215,7 @@ void FileBlockHandler(char *argres, int rw, const char *path)
|
|||
if (FileTransaction.opertype == DELETE_ORERATION)
|
||||
{
|
||||
unlink(FileTransaction.filepath);
|
||||
FileTransaction.open_file_timeout = 0;
|
||||
snprintf(argres, VAR_MAX_VALUE_LENGTH, "\"DELETED OK\"");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user