diff options
| author | 2023-12-17 15:27:39 +0100 | |
|---|---|---|
| committer | 2023-12-17 15:27:39 +0100 | |
| commit | fd637549f34caed37bd141c2363a962fccc57a20 (patch) | |
| tree | 6830a148a04bee7b6634792652a5f1a1bcb1808e | |
| parent | New function srv_archive_qitem(). (diff) | |
| download | snac2-fd637549f34caed37bd141c2363a962fccc57a20.tar.gz snac2-fd637549f34caed37bd141c2363a962fccc57a20.tar.xz snac2-fd637549f34caed37bd141c2363a962fccc57a20.zip | |
Added a prefix to srv_archive_qitem().
| -rw-r--r-- | activitypub.c | 2 | ||||
| -rw-r--r-- | data.c | 4 | ||||
| -rw-r--r-- | snac.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/activitypub.c b/activitypub.c index fa06a89..5c2d1ab 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -2136,7 +2136,7 @@ void process_queue_item(xs_dict *q_item) | |||
| 2136 | unlink(tmpfn); | 2136 | unlink(tmpfn); |
| 2137 | 2137 | ||
| 2138 | if (cnt == 0) { | 2138 | if (cnt == 0) { |
| 2139 | srv_archive_qitem(q_item); | 2139 | srv_archive_qitem("no_valid_recipients", q_item); |
| 2140 | srv_debug(1, xs_fmt("no valid recipients for %s", tmpfn)); | 2140 | srv_debug(1, xs_fmt("no valid recipients for %s", tmpfn)); |
| 2141 | } | 2141 | } |
| 2142 | } | 2142 | } |
| @@ -2754,11 +2754,11 @@ void srv_archive_error(const char *prefix, const xs_str *err, | |||
| 2754 | } | 2754 | } |
| 2755 | 2755 | ||
| 2756 | 2756 | ||
| 2757 | void srv_archive_qitem(xs_dict *q_item) | 2757 | void srv_archive_qitem(char *prefix, xs_dict *q_item) |
| 2758 | /* archives a q_item in the error folder */ | 2758 | /* archives a q_item in the error folder */ |
| 2759 | { | 2759 | { |
| 2760 | xs *ntid = tid(0); | 2760 | xs *ntid = tid(0); |
| 2761 | xs *fn = xs_fmt("%s/error/%s_qitem", srv_basedir, ntid); | 2761 | xs *fn = xs_fmt("%s/error/%s_qitem_%s", srv_basedir, ntid, prefix); |
| 2762 | FILE *f; | 2762 | FILE *f; |
| 2763 | 2763 | ||
| 2764 | if ((f = fopen(fn, "w")) != NULL) { | 2764 | if ((f = fopen(fn, "w")) != NULL) { |
| @@ -64,7 +64,7 @@ void srv_archive(const char *direction, const char *url, xs_dict *req, | |||
| 64 | const char *body, int b_size); | 64 | const char *body, int b_size); |
| 65 | void srv_archive_error(const char *prefix, const xs_str *err, | 65 | void srv_archive_error(const char *prefix, const xs_str *err, |
| 66 | const xs_dict *req, const xs_val *data); | 66 | const xs_dict *req, const xs_val *data); |
| 67 | void srv_archive_qitem(xs_dict *q_item); | 67 | void srv_archive_qitem(char *prefix, xs_dict *q_item); |
| 68 | 68 | ||
| 69 | double mtime_nl(const char *fn, int *n_link); | 69 | double mtime_nl(const char *fn, int *n_link); |
| 70 | #define mtime(fn) mtime_nl(fn, NULL) | 70 | #define mtime(fn) mtime_nl(fn, NULL) |