mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-12 21:10:22 +03:00
Treat 410 Gone from actors specially.
This commit is contained in:
parent
2be2c07e9c
commit
c5a7a9c475
@ -564,6 +564,7 @@ int process_message(snac *snac, char *msg, char *req)
|
|||||||
char *actor = xs_dict_get(msg, "actor");
|
char *actor = xs_dict_get(msg, "actor");
|
||||||
char *type = xs_dict_get(msg, "type");
|
char *type = xs_dict_get(msg, "type");
|
||||||
xs *actor_o = NULL;
|
xs *actor_o = NULL;
|
||||||
|
int a_status;
|
||||||
|
|
||||||
char *object, *utype;
|
char *object, *utype;
|
||||||
|
|
||||||
@ -574,8 +575,17 @@ int process_message(snac *snac, char *msg, char *req)
|
|||||||
utype = "(null)";
|
utype = "(null)";
|
||||||
|
|
||||||
/* bring the actor */
|
/* bring the actor */
|
||||||
if (!valid_status(actor_request(snac, actor, &actor_o))) {
|
a_status = actor_request(snac, actor, &actor_o);
|
||||||
snac_log(snac, xs_fmt("error requesting actor %s -- retry later", actor));
|
|
||||||
|
/* if it's a 410 Gone, it's a Delete crap that can be ignored */
|
||||||
|
if (a_status == 410) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!valid_status(a_status)) {
|
||||||
|
snac_log(snac,
|
||||||
|
xs_fmt("error requesting actor %s %d -- retry later", actor, a_status));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user