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
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 4 additions and 1 deletions

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);