socket interconnection skeleton

This commit is contained in:
2012-03-23 14:06:39 +04:00
parent 51c8931cbd
commit 7feb436240
4 changed files with 22 additions and 2 deletions

View File

@@ -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);
}