client: make sure the watch exists while sending data
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 28 Jan 2013 09:31:50 +0000 (10:31 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 28 Jan 2013 10:11:46 +0000 (11:11 +0100)
commit6db0dbc76cf215eac8e4771e9672a268fb840bb9
tree73161036c6551039e440e70580fdad66b81d22bf
parent114442bdb8d1f045b2a0d27fc73cf882c24dfcd9
client: make sure the watch exists while sending data

Protect the send_func with a lock. This allows us to wait for sending
to complete before changing the send_func and user_data. We add an
extra ref to the watch to make sure that it remains valid during
sending.
When closing the connection, set the send_func to NULL

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692433
gst/rtsp-server/rtsp-client.c