}
SMUX_SETTINGS::SMUX_SETTINGS()
- : ip(0),
- port(0)
+ : errorStr(),
+ ip(0),
+ port(0),
+ password()
{}
int SMUX_SETTINGS::ParseSettings(const MODULE_SETTINGS & s)
services(NULL),
corporations(NULL),
traffcounter(NULL),
+ errorStr(),
+ smuxSettings(),
+ settings(),
+ thread(),
+ mutex(),
running(false),
stopped(true),
sock(-1),
return 0;
}
+int SMUX::Reload()
+{
+if (Stop())
+ return -1;
+if (Start())
+ return -1;
+return 0;
+}
+
void * SMUX::Runner(void * d)
{
SMUX * smux = static_cast<SMUX *>(d);
void SMUX::Run()
{
-SendOpenPDU(sock);
-SendRReqPDU(sock);
+stopped = true;
+if (!SendOpenPDU(sock))
+ return;
+if (!SendRReqPDU(sock))
+ return;
running = true;
stopped = false;