This commit is contained in:
2021-06-15 16:38:30 +01:00
commit 8c5c5c0f45
12 changed files with 468 additions and 0 deletions

24
debug.c Normal file
View File

@@ -0,0 +1,24 @@
// SegFault & Debug handler - By Nik_Doof
#include "dhsd.h"
#include <stdio.h>
#include <unistd.h>
void han_segv()
{
#ifdef USE_SYSLOG
closelog();
#endif
close(sockfd);
pdebug("SegFault in DHSD...exiting safely...");
//return 1;
exit(0);
}
void pdebug(char *dmsg)
{
#ifdef DEBUG
printf("DhsD Debug: %s\n",dmsg);
#endif
}