Explorar o código

Return 110 "Response Is Stale" to stale actors.

default %!s(int64=3) %!d(string=hai) anos
pai
achega
51dc99a86d
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      data.c

+ 2 - 1
data.c

@@ -686,13 +686,14 @@ int actor_get(snac *snac, char *actor, d_char **data)
 
 
     if (t + max_time < (float) time(NULL)) {
     if (t + max_time < (float) time(NULL)) {
         /* actor data exists but also stinks */
         /* actor data exists but also stinks */
-        status = 202;
 
 
         if ((f = fopen(fn, "a")) != NULL) {
         if ((f = fopen(fn, "a")) != NULL) {
             /* write a blank at the end to 'touch' the file */
             /* write a blank at the end to 'touch' the file */
             fwrite(" ", 1, 1, f);
             fwrite(" ", 1, 1, f);
             fclose(f);
             fclose(f);
         }
         }
+
+        status = 110; /* "Response Is Stale" */
     }
     }
     else {
     else {
         /* it's still valid */
         /* it's still valid */