]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/ping/ping.cpp
mod_smux config samples added
[stg.git] / projects / stargazer / plugins / other / ping / ping.cpp
index 7abc53b9f5b1757b3157754255f788c69ee4e05b..2968082ae64fe5ad44954ae86d25f699af502cb5 100644 (file)
@@ -1,6 +1,6 @@
-#include <stdio.h>
-#include <signal.h>
-
+#include <cstdio>
+#include <cassert>
+#include <csignal>
 #include <ctime>
 #include <algorithm>
 
 #include <ctime>
 #include <algorithm>
 
@@ -296,11 +296,7 @@ STG_LOCKER lock(&mutex, __FILE__, __LINE__);
 
 USER_PTR u;
 int h = users->OpenSearch();
 
 USER_PTR u;
 int h = users->OpenSearch();
-if (!h)
-    {
-    printfd(__FILE__, "users->OpenSearch() error\n");
-    return;
-    }
+assert(h && "USERS::OpenSearch is always correct");
 
 while (users->SearchNext(h, &u) == 0)
     {
 
 while (users->SearchNext(h, &u) == 0)
     {