diff options
| author | 2022-09-22 18:56:50 +0200 | |
|---|---|---|
| committer | 2022-09-22 18:56:50 +0200 | |
| commit | 51dc99a86d3b10b5bcea52346f1e912daabe3c76 (patch) | |
| tree | 61f6be42cc868856f9521457ecf3e10631f9fd97 /data.c | |
| parent | Minor actor tweak. (diff) | |
| download | snac2-51dc99a86d3b10b5bcea52346f1e912daabe3c76.tar.gz snac2-51dc99a86d3b10b5bcea52346f1e912daabe3c76.tar.xz snac2-51dc99a86d3b10b5bcea52346f1e912daabe3c76.zip | |
Return 110 "Response Is Stale" to stale actors.
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -686,13 +686,14 @@ int actor_get(snac *snac, char *actor, d_char **data) | |||
| 686 | 686 | ||
| 687 | if (t + max_time < (float) time(NULL)) { | 687 | if (t + max_time < (float) time(NULL)) { |
| 688 | /* actor data exists but also stinks */ | 688 | /* actor data exists but also stinks */ |
| 689 | status = 202; | ||
| 690 | 689 | ||
| 691 | if ((f = fopen(fn, "a")) != NULL) { | 690 | if ((f = fopen(fn, "a")) != NULL) { |
| 692 | /* write a blank at the end to 'touch' the file */ | 691 | /* write a blank at the end to 'touch' the file */ |
| 693 | fwrite(" ", 1, 1, f); | 692 | fwrite(" ", 1, 1, f); |
| 694 | fclose(f); | 693 | fclose(f); |
| 695 | } | 694 | } |
| 695 | |||
| 696 | status = 110; /* "Response Is Stale" */ | ||
| 696 | } | 697 | } |
| 697 | else { | 698 | else { |
| 698 | /* it's still valid */ | 699 | /* it's still valid */ |