socket interconnection skeleton
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "yasnd-gammu.h"
|
||||
#include "yasnd-log.h"
|
||||
#include "yasnd-lpt.h"
|
||||
#include "yasnd-sock.h"
|
||||
|
||||
cfg_t *cfg; // pointer to configuration structure
|
||||
char pidfile[]="/var/run/yasnd.pid"; // pidfile path
|
||||
@@ -154,6 +155,8 @@ void init()
|
||||
gammu_init();
|
||||
// initialize LPT control circuit
|
||||
lpt_init();
|
||||
// initialize server socket
|
||||
sock_init();
|
||||
}
|
||||
|
||||
void check_host(int num,host_decl* host)
|
||||
@@ -285,6 +288,8 @@ void signal_handler(int signum)
|
||||
lpt_lock();
|
||||
// close log decriptor
|
||||
log_close();
|
||||
// close server socket
|
||||
sock_close();
|
||||
//
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user