7 #include "uniconfdaemon.h"
8 #include "uniconfdaemonconn.h"
9 #include "wvlistener.h"
10 #include "uninullgen.h"
13 #include "uniconfpamconn.h"
19 : cfg(_cfg), log(
"UniConf Daemon"), debug(log.split(
WvLog::Debug1))
24 assert(!authenticate);
27 permgen = _permgen ? _permgen :
new UniNullGen();
32 UniConfDaemon::~UniConfDaemon()
43 debug(
"Saving changes.\n");
45 debug(
"Done saving changes.\n");
52 void UniConfDaemon::accept(
WvStream *stream)
67 void UniConfDaemon::listencallback(
IWvStream *s)
69 const WvAddr *a = s->src();
71 debug(
"Incoming connection from %s.\n", *a);
73 debug(
"Incoming connection from UNKNOWN.\n");
76 debug(
"Error: %s\n", s->errstr());
87 debug(
"Listening on %s.\n", *l->src());
90 log(WvLog::Error,
"Can't listen: %s\n", l->errstr());
91 seterr_both(l->
geterr(), l->errstr());
96 l->
onaccept(wv::bind(&UniConfDaemon::listencallback,
this, _1));
97 append(l,
true,
"listener");