X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=kernel%2Fpersist.c;fp=kernel%2Fpersist.c;h=34263b1e719a82697a2d83ae87beb21123546d70;hb=68ab7e062ced1b3d335ab6432840a393b6627a27;hp=219024f7650b6b261b55401b65cb12888899d17c;hpb=2378d22cf24ed22617d5d00f7cb17c03243ce176;p=egate.git diff --git a/kernel/persist.c b/kernel/persist.c index 219024f..34263b1 100644 --- a/kernel/persist.c +++ b/kernel/persist.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: persist.c,v $ - * Revision 1.2 1995/04/19 10:46:19 adam + * Revision 1.3 1995/04/19 13:19:09 adam + * New command: account - for authentication. + * + * Revision 1.2 1995/04/19 10:46:19 adam * Persistency works much better now. New command: status - history-like * * Revision 1.1 1995/04/19 07:31:10 adam @@ -224,6 +227,11 @@ int load_p_state (int userid) if (!fgetsx (fline, 1024, inf)) return -1; + if (sscanf (fline, "%s", info.account) != 1) + *info.account = '\0'; + + if (!fgetsx (fline, 1024, inf)) + return -1; free (info.database); info.database = gw_strdup (fline); @@ -319,7 +327,8 @@ int save_p_state (int userid) return -1; } gw_log (GW_LOG_DEBUG, KERNEL_LOG, "Writing persistence file %s", fname); - fprintf (of, "%s\n%s\n%d\n", info.target, info.database, info.setno); + fprintf (of, "%s\n%s\n%s\n%d\n", info.target, info.account, + info.database, info.setno); save_sets (of, info.sets); fclose (of); return 0;