pkgsrc/net/ettercap/patches/patch-ad

38 lines
954 B
Text
Raw Normal View History

$NetBSD: patch-ad,v 1.1 2003/06/07 10:42:27 jmmv Exp $
--- src/ec_illithid.c.orig 2002-09-06 10:57:31.000000000 +0200
+++ src/ec_illithid.c
@@ -87,8 +87,8 @@ int illithid_gwip;
int illithid_buffer = -1;
pthread_t decoder_pid;
-pthread_mutex_t decoder_mtx = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t decoder_cond = PTHREAD_COND_INITIALIZER;
+pthread_mutex_t decoder_mtx;
+pthread_cond_t decoder_cond;
// protos...
@@ -117,6 +117,11 @@ void * Illithid_Decoder(void *dummy)
DEBUG_MSG("Illithid_Decoder -- running");
+ pthread_mutex_init(&decoder_mtx, NULL);
+ pthread_cond_init(&decoder_cond, NULL);
+
+ pthread_mutex_lock(&decoder_mtx);
+
LOOP {
pthread_testcancel();
@@ -1110,6 +1115,9 @@ void Illithid_Reset_Conn(void *dummy)
hash_table[j] = 0;
}
+ pthread_mutex_lock(&decoder_mtx);
+ pthread_mutex_unlock(&decoder_mtx);
+
ECThread_destroy(decoder_pid);
Buffer_Flush(illithid_buffer);