#include "stg/common.h"
#include "stg/locker.h"
-#include "pinger.h"
+#include "stg/pinger.h"
#ifdef STG_TIME
extern volatile time_t stgTime;
struct timespec ts = {0, 200000000};
nanosleep(&ts, NULL);
}
-
- //after 5 seconds waiting thread still running. now killing it
- if (isRunningRecver)
- {
- if (pthread_kill(recvThread, SIGINT))
- {
- errorStr = "Cannot kill thread.";
- return -1;
- }
- }
}
if (isRunningSender)
struct timespec ts = {0, 200000000};
nanosleep(&ts, NULL);
}
-
- //after 5 seconds waiting thread still running. now killing it
- if (isRunningSender)
- {
- if (pthread_kill(sendThread, SIGINT))
- {
- errorStr = "Cannot kill thread.";
- return -1;
- }
- }
}
close(sendSocket);
+
+if (isRunningSender || isRunningRecver)
+ return -1;
+
return 0;
}
//-----------------------------------------------------------------------------