Browse Source

reduced message overhead and fixed debug messages

master
Michael Preisach 4 years ago
parent
commit
ed6c4c309f
  1. 2
      common.h
  2. 4
      verifier.c

2
common.h

@ -18,7 +18,7 @@
#define NONCE_SIZE 64
#define MAX_MSGSIZE 15000
#define MAX_CHKSUMSIZE 1024
#define MAX_BUFSIZE (((MAX_MSGSIZE + 2) / 3) * 4) + (((MAX_CHKSUMSIZE + 2) / 3) * 4) + 1536
#define MAX_BUFSIZE (((MAX_MSGSIZE + 2) / 3) * 4) + (((MAX_CHKSUMSIZE + 2) / 3) * 4) + 900
/* #define MAX_MSGSIZE ((MAX_BUFSIZE - 1536) / 2) - MAX_CHKSUMSIZE //for bin to hex*/
/* #define MAX_MSGSIZE ((MAX_BUFSIZE - 1536) / 4 * 3) - MAX_CHKSUMSIZE //for base64 */

4
verifier.c

@ -74,7 +74,9 @@ int process_verifier(char *buffer) {
int ret = 0;
char remote_ip[16];
#ifdef DEBUG
printf("> VERIFIER: %s\n", buffer);
#endif
if (0 == strncasecmp("VERIFYMSG", buffer, 9)) {
ret = verifier_verifymsg(&buffer[10]);
@ -103,7 +105,9 @@ int process_verifier(char *buffer) {
}
if (0 == ret) {
#ifdef DEBUG
printf("< VERIFIER: %s\n", buffer);
#endif
}
return ret;
}

Loading…
Cancel
Save