Skip to content
Snippets Groups Projects
Commit 3def8112 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Free/zero out the file_t struct *after* sending the MQTT action msg

... not before. This explains why FTP-uploaded actions had a (null) filename.
parent a902a031
No related branches found
No related tags found
No related merge requests found
......@@ -1093,7 +1093,6 @@ static void receive_thread(void* arg)
lprintf(LOG_ERR,"%04d <%s> !DATA ERROR adding file (%s) to database"
,xfer.ctrl_sock, xfer.user->alias, f.name);
}
smb_freefilemem(&f);
if(scfg.dir[f.dir]->upload_sem[0])
ftouch(scfg.dir[f.dir]->upload_sem);
......@@ -1113,6 +1112,7 @@ static void receive_thread(void* arg)
inc_upload_stats(&scfg, 1, (ulong)total);
mqtt_file_upload(&mqtt, xfer.user, &f, total, xfer.client);
smb_freefilemem(&f);
}
/* Send ACK */
sockprintf(xfer.ctrl_sock,sess,"226 Upload complete (%lu cps).",cps);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment