[farsight2/master] Make the session mutex recursive
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:20:19 PST 2008
---
gst/fsrtpconference/fs-rtp-session.c | 4 ++--
gst/fsrtpconference/fs-rtp-session.h | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index effda74..33eb681 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -247,7 +247,7 @@ fs_rtp_session_init (FsRtpSession *self)
self->priv->transmitters = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_object_unref);
- self->mutex = g_mutex_new ();
+ g_static_rec_mutex_init (&self->mutex);
self->priv->media_type = FS_MEDIA_TYPE_LAST + 1;
}
@@ -444,7 +444,7 @@ fs_rtp_session_finalize (GObject *object)
{
FsRtpSession *self = FS_RTP_SESSION (object);
- g_mutex_free (self->mutex);
+ g_static_rec_mutex_free (&self->mutex);
if (self->priv->local_codecs_configuration)
fs_codec_list_destroy (self->priv->local_codecs_configuration);
diff --git a/gst/fsrtpconference/fs-rtp-session.h b/gst/fsrtpconference/fs-rtp-session.h
index ef8670a..15cb147 100644
--- a/gst/fsrtpconference/fs-rtp-session.h
+++ b/gst/fsrtpconference/fs-rtp-session.h
@@ -69,15 +69,15 @@ struct _FsRtpSession
/*< private >*/
- GMutex *mutex; /* Should only be accessed using the macros */
+ GStaticRecMutex mutex; /* Should only be accessed using the macros */
FsRtpSessionPrivate *priv;
};
#define FS_RTP_SESSION_LOCK(session) \
- g_mutex_lock (FS_RTP_SESSION(session)->mutex)
+ g_static_rec_mutex_lock (&FS_RTP_SESSION (session)->mutex)
#define FS_RTP_SESSION_UNLOCK(session) \
- g_mutex_unlock (FS_RTP_SESSION(session)->mutex)
+ g_static_rec_mutex_unlock (&FS_RTP_SESSION (session)->mutex)
GType fs_rtp_session_get_type (void);
--
1.5.6.5
More information about the farsight-commits
mailing list