Просмотр исходного кода

Set value 'purge_days' to 1 by default when creating the relay user.

default 1 год назад
Родитель
Сommit
a72d09ae56
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      utils.c

+ 4 - 0
utils.c

@@ -318,6 +318,10 @@ int adduser(const char *uid)
         mkdirx(d);
     }
 
+    /* add a specially short data retention time for the relay */
+    if (strcmp(uid, "relay") == 0)
+        config = xs_dict_set(config, "purge_days", xs_stock(1));
+
     xs *cfn = xs_fmt("%s/user.json", basedir);
 
     if ((f = fopen(cfn, "w")) == NULL) {