Fixed config sync problem due to CRLF-LF

SVN revision: 834
This commit is contained in:
Stefan Ritt 2004-03-17 20:57:07 +00:00
parent 7cb153c332
commit 5a76734bd3

View File

@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG Contents: Web server program for Electronic Logbook ELOG
$Log$ $Log$
Revision 1.299 2004/03/17 20:57:07 midas
Fixed config sync problem due to CRLF-LF
Revision 1.298 2004/03/16 15:39:53 midas Revision 1.298 2004/03/16 15:39:53 midas
Fixed endless loop in strip_html Fixed endless loop in strip_html
@ -8926,6 +8929,7 @@ int show_md5_page(LOGBOOK * lbs)
else { else {
rsprintf("ID: %6d MD5:", 0); rsprintf("ID: %6d MD5:", 0);
remove_crlf(buffer);
MD5_checksum(buffer, strlen(buffer), digest); MD5_checksum(buffer, strlen(buffer), digest);
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
@ -9885,22 +9889,22 @@ void synchronize_logbook(LOGBOOK * lbs, BOOL bcron)
logf(lbs, "Error loading configuration file: %s", error_str); logf(lbs, "Error loading configuration file: %s", error_str);
else else
rsprintf("Error loading configuration file: %s\n", error_str); rsprintf("Error loading configuration file: %s\n", error_str);
} else } else {
remove_crlf(buffer);
MD5_checksum(buffer, strlen(buffer), digest); MD5_checksum(buffer, strlen(buffer), digest);
}
/* compare MD5s */ /* compare MD5s */
/* printf("ID0: ");
printf("ID0: "); for (j = 0; j < 16; j++)
for (j = 0; j < 16; j++) printf("%02X", digest[j]);
printf("%02X", digest[j]); printf("\nCache : ");
printf("\nCache : "); for (j = 0; j < 16; j++)
for (j = 0; j < 16; j++) printf("%02X", md5_cache[0].md5_digest[j]);
printf("%02X", md5_cache[0].md5_digest[j]); printf("\nRemote: ");
printf("\nRemote: "); for (j = 0; j < 16; j++)
for (j = 0; j < 16; j++) printf("%02X", md5_remote[0].md5_digest[j]);
printf("%02X", md5_remote[0].md5_digest[j]); printf("\n\n");
printf("\n\n");
*/
if (n_remote > 0) { if (n_remote > 0) {
/* if config has been changed on this server, but not remotely, send it */ /* if config has been changed on this server, but not remotely, send it */