mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-26 06:53:37 +00:00
Use utimes() to 'touch' the actor file in actor_get().
This commit is contained in:
parent
f839dc11c9
commit
1307b6203c
1 changed files with 2 additions and 6 deletions
8
data.c
8
data.c
|
@ -1407,13 +1407,9 @@ int actor_get(snac *snac1, const char *actor, xs_dict **data)
|
||||||
|
|
||||||
if (mtime(fn) + max_time < (double) time(NULL)) {
|
if (mtime(fn) + max_time < (double) time(NULL)) {
|
||||||
/* actor data exists but also stinks */
|
/* actor data exists but also stinks */
|
||||||
FILE *f;
|
|
||||||
|
|
||||||
if ((f = fopen(fn, "a")) != NULL) {
|
/* touch the file */
|
||||||
/* write a blank at the end to 'touch' the file */
|
utimes(fn, NULL);
|
||||||
fwrite(" ", 1, 1, f);
|
|
||||||
fclose(f);
|
|
||||||
}
|
|
||||||
|
|
||||||
status = 205; /* "205: Reset Content" "110: Response Is Stale" */
|
status = 205; /* "205: Reset Content" "110: Response Is Stale" */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue