diff options
| author | 2023-12-17 15:21:16 +0100 | |
|---|---|---|
| committer | 2023-12-17 15:21:16 +0100 | |
| commit | f8196b4ef6369b5cbaf746cbaf6101eba1fb783b (patch) | |
| tree | e1142beb5839eaa332778c83c79cbfe5b0b0573e /data.c | |
| parent | Fixed shared inbox distribution logic for Delete messages. (diff) | |
| download | snac2-f8196b4ef6369b5cbaf746cbaf6101eba1fb783b.tar.gz snac2-f8196b4ef6369b5cbaf746cbaf6101eba1fb783b.tar.xz snac2-f8196b4ef6369b5cbaf746cbaf6101eba1fb783b.zip | |
New function srv_archive_qitem().
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 14 |
1 files changed, 14 insertions, 0 deletions
| @@ -2752,3 +2752,17 @@ void srv_archive_error(const char *prefix, const xs_str *err, | |||
| 2752 | fclose(f); | 2752 | fclose(f); |
| 2753 | } | 2753 | } |
| 2754 | } | 2754 | } |
| 2755 | |||
| 2756 | |||
| 2757 | void srv_archive_qitem(xs_dict *q_item) | ||
| 2758 | /* archives a q_item in the error folder */ | ||
| 2759 | { | ||
| 2760 | xs *ntid = tid(0); | ||
| 2761 | xs *fn = xs_fmt("%s/error/%s_qitem", srv_basedir, ntid); | ||
| 2762 | FILE *f; | ||
| 2763 | |||
| 2764 | if ((f = fopen(fn, "w")) != NULL) { | ||
| 2765 | xs_json_dump(q_item, 4, f); | ||
| 2766 | fclose(f); | ||
| 2767 | } | ||
| 2768 | } | ||