diff --git a/daemon/Makefile.am b/daemon/Makefile.am index b29e8d0..06a24eb 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -1,9 +1,9 @@ -include_HEADERS = $(top_srcdir)/yasnd.h +include_HEADERS = $(top_srcdir)/yasnd.h yasnd-sock.h yasnd_LDADD = ${libconfuse_LIBS} yasnd_LDADD += $(top_srcdir)/lib/libyasnd.la sbin_PROGRAMS = yasnd -yasnd_SOURCES = yasnd.c yasnd-ipc.c +yasnd_SOURCES = yasnd.c yasnd-ipc.c yasnd-sock.c yasnd_CPPFLAGS = -I$(top_srcdir) distclean-local: diff --git a/daemon/yasnd-sock.c b/daemon/yasnd-sock.c new file mode 100644 index 0000000..c518336 --- /dev/null +++ b/daemon/yasnd-sock.c @@ -0,0 +1,7 @@ +int sock_init() +{ +} + +void sock_close() +{ +} diff --git a/daemon/yasnd-sock.h b/daemon/yasnd-sock.h new file mode 100644 index 0000000..cb189df --- /dev/null +++ b/daemon/yasnd-sock.h @@ -0,0 +1,8 @@ +#ifndef YASND_SOCK_H +#define YASND_SOCK_H + +// External functions +extern int sock_init(); +extern void sock_close(); + +#endif diff --git a/daemon/yasnd.c b/daemon/yasnd.c index a1d0d30..726daba 100644 --- a/daemon/yasnd.c +++ b/daemon/yasnd.c @@ -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); }