summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2015-09-01 17:14:19 +0100
committerFrediano Ziglio <fziglio@redhat.com>2015-09-01 17:17:21 +0100
commit2a09a5fa36763214fd0f03f57528eba9a878039f (patch)
treed9ea1fc1439ff43942abfb842e8a39538bb25250 /server
parente5063799ab8909c37c286ecc584251be02934d7f (diff)
downloadspice-2a09a5fa36763214fd0f03f57528eba9a878039f.tar.gz
spice-2a09a5fa36763214fd0f03f57528eba9a878039f.tar.xz
spice-2a09a5fa36763214fd0f03f57528eba9a878039f.zip
replay: compatibility with former version
GMutex usage in replay.c was not working so replace with plain pthread. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'server')
-rw-r--r--server/tests/replay.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/server/tests/replay.c b/server/tests/replay.c
index 01590c09..efa97e90 100644
--- a/server/tests/replay.c
+++ b/server/tests/replay.c
@@ -12,6 +12,7 @@
#include <sys/wait.h>
#include <fcntl.h>
#include <glib.h>
+#include <pthread.h>
#include <spice/macros.h>
#include "red_replay_qxl.h"
@@ -30,7 +31,7 @@ static GMainLoop *loop = NULL;
static GAsyncQueue *aqueue = NULL;
static long total_size;
-static GMutex mutex;
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static guint fill_source_id = 0;
@@ -102,9 +103,9 @@ static gboolean fill_queue_idle(gpointer user_data)
end:
if (!keep) {
- g_mutex_lock(&mutex);
+ pthread_mutex_lock(&mutex);
fill_source_id = 0;
- g_mutex_unlock(&mutex);
+ pthread_mutex_unlock(&mutex);
}
spice_qxl_wakeup(&display_sin);
@@ -113,7 +114,7 @@ end:
static void fill_queue(void)
{
- g_mutex_lock(&mutex);
+ pthread_mutex_lock(&mutex);
if (!started)
goto end;
@@ -124,7 +125,7 @@ static void fill_queue(void)
fill_source_id = g_idle_add(fill_queue_idle, NULL);
end:
- g_mutex_unlock(&mutex);
+ pthread_mutex_unlock(&mutex);
}