Added a prefix to srv_archive_qitem().

This commit is contained in:
default 2023-12-17 15:27:39 +01:00
parent f8196b4ef6
commit fd637549f3
3 changed files with 4 additions and 4 deletions

View File

@ -2136,7 +2136,7 @@ void process_queue_item(xs_dict *q_item)
unlink(tmpfn);
if (cnt == 0) {
srv_archive_qitem(q_item);
srv_archive_qitem("no_valid_recipients", q_item);
srv_debug(1, xs_fmt("no valid recipients for %s", tmpfn));
}
}

4
data.c
View File

@ -2754,11 +2754,11 @@ void srv_archive_error(const char *prefix, const xs_str *err,
}
void srv_archive_qitem(xs_dict *q_item)
void srv_archive_qitem(char *prefix, xs_dict *q_item)
/* archives a q_item in the error folder */
{
xs *ntid = tid(0);
xs *fn = xs_fmt("%s/error/%s_qitem", srv_basedir, ntid);
xs *fn = xs_fmt("%s/error/%s_qitem_%s", srv_basedir, ntid, prefix);
FILE *f;
if ((f = fopen(fn, "w")) != NULL) {

2
snac.h
View File

@ -64,7 +64,7 @@ void srv_archive(const char *direction, const char *url, xs_dict *req,
const char *body, int b_size);
void srv_archive_error(const char *prefix, const xs_str *err,
const xs_dict *req, const xs_val *data);
void srv_archive_qitem(xs_dict *q_item);
void srv_archive_qitem(char *prefix, xs_dict *q_item);
double mtime_nl(const char *fn, int *n_link);
#define mtime(fn) mtime_nl(fn, NULL)