CloseUDP();
for (int i = 0; i < 25 && !stoppedUDP; ++i)
{
- usleep(200000);
+ struct timespec ts = {0, 200000000};
+ nanosleep(&ts, NULL);
}
if (stoppedUDP)
{
CloseTCP();
for (int i = 0; i < 25 && !stoppedTCP; ++i)
{
- usleep(200000);
+ struct timespec ts = {0, 200000000};
+ nanosleep(&ts, NULL);
}
if (stoppedTCP)
{
void * NF_CAP::RunUDP(void * c)
{
+sigset_t signalSet;
+sigfillset(&signalSet);
+pthread_sigmask(SIG_BLOCK, &signalSet, NULL);
+
NF_CAP * cap = static_cast<NF_CAP *>(c);
uint8_t buf[BUF_SIZE];
int res;
void * NF_CAP::RunTCP(void * c)
{
+sigset_t signalSet;
+sigfillset(&signalSet);
+pthread_sigmask(SIG_BLOCK, &signalSet, NULL);
+
NF_CAP * cap = static_cast<NF_CAP *>(c);
uint8_t buf[BUF_SIZE];
int res;