diff options
| author | 2022-09-29 09:11:43 +0200 | |
|---|---|---|
| committer | 2022-09-29 09:11:43 +0200 | |
| commit | 49bca7e273640c65f9aa41309805ff3f7425123d (patch) | |
| tree | 1e6e9c0b1cb5408c5eded094d4643c5274f7da09 /activitypub.c | |
| parent | Treat 410 Gone from actors specially. (diff) | |
| download | snac2-49bca7e273640c65f9aa41309805ff3f7425123d.tar.gz snac2-49bca7e273640c65f9aa41309805ff3f7425123d.tar.xz snac2-49bca7e273640c65f9aa41309805ff3f7425123d.zip | |
html_entry() is built in its own string and then added.
This will be faster.
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c index 51ae6fa..cebefca 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -577,13 +577,17 @@ int process_message(snac *snac, char *msg, char *req) | |||
| 577 | /* bring the actor */ | 577 | /* bring the actor */ |
| 578 | a_status = actor_request(snac, actor, &actor_o); | 578 | a_status = actor_request(snac, actor, &actor_o); |
| 579 | 579 | ||
| 580 | /* if it's a 410 Gone, it's a Delete crap that can be ignored */ | 580 | /* if the actor does not explicitly exist, discard */ |
| 581 | if (a_status == 410) { | 581 | if (a_status == 404 || a_status == 410) { |
| 582 | snac_debug(snac, 1, | ||
| 583 | xs_fmt("dropping message due to actor error %s %d", actor, a_status)); | ||
| 584 | |||
| 582 | return 1; | 585 | return 1; |
| 583 | } | 586 | } |
| 584 | 587 | ||
| 585 | if (!valid_status(a_status)) { | 588 | if (!valid_status(a_status)) { |
| 586 | snac_log(snac, | 589 | /* other actor download errors may need a retry */ |
| 590 | snac_debug(snac, 1, | ||
| 587 | xs_fmt("error requesting actor %s %d -- retry later", actor, a_status)); | 591 | xs_fmt("error requesting actor %s %d -- retry later", actor, a_status)); |
| 588 | 592 | ||
| 589 | return 0; | 593 | return 0; |