mirror of
https://github.com/nikdoof/dhsd.git
synced 2025-12-18 13:29:21 +00:00
v0.0.1
This commit is contained in:
24
debug.c
Normal file
24
debug.c
Normal 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user