fxlink: generate blob names based on application/type

This commit is contained in:
Lephenixnoir 2022-05-01 18:56:52 +01:00
parent 5e004f989e
commit 27e60884c3
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495

View file

@ -102,8 +102,11 @@ static void message_finish(message_t *msg)
}
}
static char combined_type[33];
snprintf(combined_type, 33, "%.16s-%.16s", msg->header.application,
msg->header.type);
/* Default to saving to a blob */
char *filename = gen_file_name(path, "blob", "bin");
char *filename = gen_file_name(path, combined_type, "bin");
FILE *fp = fopen(filename, "wb");
if(!fp) {
err("could not save to '%s': %m", filename);