summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar default2024-01-14 12:19:35 +0100
committerGravatar default2024-01-14 12:19:35 +0100
commit7ca08aebd245dc7116113bae97e31881fcc09eb0 (patch)
tree206997fd305c5a56cf7456b6090e3dabdcd1c2fb /data.c
parentMerge pull request 'Fixed a bug introduced yesterday that caused double notif... (diff)
downloadsnac2-7ca08aebd245dc7116113bae97e31881fcc09eb0.tar.gz
snac2-7ca08aebd245dc7116113bae97e31881fcc09eb0.tar.xz
snac2-7ca08aebd245dc7116113bae97e31881fcc09eb0.zip
Fixed crashes in command-line options.
Diffstat (limited to 'data.c')
-rw-r--r--data.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/data.c b/data.c
index 97cd94f..b71436e 100644
--- a/data.c
+++ b/data.c
@@ -1508,6 +1508,13 @@ int actor_get(const char *actor, xs_dict **data)
1508 return status; 1508 return status;
1509 } 1509 }
1510 1510
1511 /* if the object is corrupted, discard it */
1512 if (xs_is_null(xs_dict_get(d, "id")) || xs_is_null(xs_dict_get(d, "type"))) {
1513 srv_debug(1, xs_fmt("corrupted actor object %s", actor));
1514 d = xs_free(d);
1515 return 404;
1516 }
1517
1511 if (data) 1518 if (data)
1512 *data = d; 1519 *data = d;
1513 else 1520 else
@@ -2169,7 +2176,7 @@ void enqueue_output_raw(const char *keyid, const char *seckey,
2169 qmsg = xs_dict_append(qmsg, "seckey", seckey); 2176 qmsg = xs_dict_append(qmsg, "seckey", seckey);
2170 2177
2171 /* if it's to be sent right now, bypass the disk queue and post the job */ 2178 /* if it's to be sent right now, bypass the disk queue and post the job */
2172 if (retries == 0) 2179 if (retries == 0 && p_state != NULL)
2173 job_post(qmsg, 0); 2180 job_post(qmsg, 0);
2174 else { 2181 else {
2175 qmsg = _enqueue_put(fn, qmsg); 2182 qmsg = _enqueue_put(fn, qmsg);