|
@@ -346,7 +346,7 @@ static void edpack(settings_t *incfg, const char *hash, int what)
|
|
|
#undef dofield
|
|
#undef dofield
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+/*
|
|
|
static void
|
|
static void
|
|
|
tellconfig(settings_t *incfg)
|
|
tellconfig(settings_t *incfg)
|
|
|
{
|
|
{
|
|
@@ -376,7 +376,7 @@ tellconfig(settings_t *incfg)
|
|
|
dofield(incfg->portmax);
|
|
dofield(incfg->portmax);
|
|
|
#undef dofield
|
|
#undef dofield
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+*/
|
|
|
|
|
|
|
|
void
|
|
void
|
|
|
check_sum(const char *fname, const char *cfgfile)
|
|
check_sum(const char *fname, const char *cfgfile)
|
|
@@ -388,16 +388,16 @@ check_sum(const char *fname, const char *cfgfile)
|
|
|
|
|
|
|
|
readcfg(cfgfile);
|
|
readcfg(cfgfile);
|
|
|
|
|
|
|
|
- tellconfig(&settings);
|
|
|
|
|
|
|
+// tellconfig(&settings);
|
|
|
if (bin_checksum(fname, WRITE_CHECKSUM|WRITE_CONF|WRITE_PACK))
|
|
if (bin_checksum(fname, WRITE_CHECKSUM|WRITE_CONF|WRITE_PACK))
|
|
|
printf("* Wrote settings to binary.\n");
|
|
printf("* Wrote settings to binary.\n");
|
|
|
exit(0);
|
|
exit(0);
|
|
|
} else {
|
|
} else {
|
|
|
char *hash = bin_checksum(fname, GET_CHECKSUM);
|
|
char *hash = bin_checksum(fname, GET_CHECKSUM);
|
|
|
|
|
|
|
|
- tellconfig(&settings);
|
|
|
|
|
|
|
+// tellconfig(&settings);
|
|
|
edpack(&settings, hash, PACK_DEC);
|
|
edpack(&settings, hash, PACK_DEC);
|
|
|
- tellconfig(&settings);
|
|
|
|
|
|
|
+// tellconfig(&settings);
|
|
|
|
|
|
|
|
if (strcmp(settings.hash, hash)) {
|
|
if (strcmp(settings.hash, hash)) {
|
|
|
unlink(fname);
|
|
unlink(fname);
|