]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/smux/smux.cpp
Initialize arcs member in all OID constructors
[stg.git] / projects / stargazer / plugins / other / smux / smux.cpp
index bcfc940e432f146a7fffa4e50c4fac1b526600df..fdcaaf0207639113da6c07798c0f7c3b8e2d8ab6 100644 (file)
@@ -256,6 +256,15 @@ printfd(__FILE__, "SMUX::Stop() - After\n");
 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);
@@ -267,8 +276,11 @@ return NULL;
 
 void SMUX::Run()
 {
-SendOpenPDU(sock);
-SendRReqPDU(sock);
+stopped = true;
+if (!SendOpenPDU(sock))
+    return;
+if (!SendRReqPDU(sock))
+    return;
 running = true;
 stopped = false;