[farsight2/master] msn: Generate random session_id upon construction
Louis-Francis Ratté-Boulianne
Louis-Francis.Ratte-Boulianne at collabora.co.uk
Mon Jul 13 11:02:54 PDT 2009
---
gst/fsmsnconference/fs-msn-stream.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gst/fsmsnconference/fs-msn-stream.c b/gst/fsmsnconference/fs-msn-stream.c
index 23a6745..66a838c 100644
--- a/gst/fsmsnconference/fs-msn-stream.c
+++ b/gst/fsmsnconference/fs-msn-stream.c
@@ -182,7 +182,7 @@ fs_msn_stream_class_init (FsMsnStreamClass *klass)
g_param_spec_uint ("session-id",
"The session-id of the session",
"This is the session-id of the MSN session",
- 1, 9999, 1,
+ 0, 9999, 0,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_INITIAL_PORT,
@@ -205,8 +205,6 @@ fs_msn_stream_init (FsMsnStream *self)
self->priv->direction = FS_DIRECTION_NONE;
- self->priv->session_id = g_random_int_range (9000, 9999);
-
self->priv->mutex = g_mutex_new ();
}
@@ -430,6 +428,8 @@ fs_msn_stream_set_property (GObject *object,
break;
case PROP_SESSION_ID:
self->priv->session_id = g_value_get_uint (value);
+ if (self->priv->session_id == 0)
+ self->priv->session_id = g_random_int_range (9000, 9999);
break;
case PROP_INITIAL_PORT:
self->priv->initial_port = g_value_get_uint (value);
--
1.5.6.5
More information about the farsight-commits
mailing list