mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
dtls: fix some more compiler warnings
gcc-4.9.2: gstdtlsagent.c:114:1: error: old-style function definition gstdtlsconnection.c:253:3: error: ISO C90 forbids mixed declarations and code gstdtlsconnection.c:291:3: error: ISO C90 forbids mixed declarations and code gstdtlsconnection.c:391:3: error: ISO C90 forbids mixed declarations and code gstdtlsconnection.c:434:3: error: ISO C90 forbids mixed declarations and code gstdtlsconnection.c:773:1: error: 'BIO_s_gst_dtls_connection' was used with no prototype before its definition gstdtlsconnection.c:773:1: error: old-style function definition
This commit is contained in:
parent
d9344ad820
commit
86a889883e
2 changed files with 21 additions and 10 deletions
|
@ -111,7 +111,7 @@ ssl_thread_id_function (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_gst_dtls_init_openssl ()
|
_gst_dtls_init_openssl (void)
|
||||||
{
|
{
|
||||||
static gsize is_init = 0;
|
static gsize is_init = 0;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
|
@ -109,7 +109,7 @@ static void openssl_poll (GstDtlsConnection *);
|
||||||
static int openssl_verify_callback (int preverify_ok,
|
static int openssl_verify_callback (int preverify_ok,
|
||||||
X509_STORE_CTX * x509_ctx);
|
X509_STORE_CTX * x509_ctx);
|
||||||
|
|
||||||
static BIO_METHOD *BIO_s_gst_dtls_connection ();
|
static BIO_METHOD *BIO_s_gst_dtls_connection (void);
|
||||||
static int bio_method_write (BIO *, const char *data, int size);
|
static int bio_method_write (BIO *, const char *data, int size);
|
||||||
static int bio_method_read (BIO *, char *out_buffer, int size);
|
static int bio_method_read (BIO *, char *out_buffer, int size);
|
||||||
static long bio_method_ctrl (BIO *, int cmd, long arg1, void *arg2);
|
static long bio_method_ctrl (BIO *, int cmd, long arg1, void *arg2);
|
||||||
|
@ -249,8 +249,12 @@ gst_dtls_connection_set_property (GObject * object, guint prop_id,
|
||||||
void
|
void
|
||||||
gst_dtls_connection_start (GstDtlsConnection * self, gboolean is_client)
|
gst_dtls_connection_start (GstDtlsConnection * self, gboolean is_client)
|
||||||
{
|
{
|
||||||
|
GstDtlsConnectionPrivate *priv;
|
||||||
|
|
||||||
g_return_if_fail (GST_IS_DTLS_CONNECTION (self));
|
g_return_if_fail (GST_IS_DTLS_CONNECTION (self));
|
||||||
GstDtlsConnectionPrivate *priv = self->priv;
|
|
||||||
|
priv = self->priv;
|
||||||
|
|
||||||
g_return_if_fail (priv->send_closure);
|
g_return_if_fail (priv->send_closure);
|
||||||
g_return_if_fail (priv->ssl);
|
g_return_if_fail (priv->ssl);
|
||||||
g_return_if_fail (priv->bio);
|
g_return_if_fail (priv->bio);
|
||||||
|
@ -286,11 +290,15 @@ gst_dtls_connection_start (GstDtlsConnection * self, gboolean is_client)
|
||||||
void
|
void
|
||||||
gst_dtls_connection_start_timeout (GstDtlsConnection * self)
|
gst_dtls_connection_start_timeout (GstDtlsConnection * self)
|
||||||
{
|
{
|
||||||
|
GstDtlsConnectionPrivate *priv;
|
||||||
|
GError *error = NULL;
|
||||||
|
gchar *thread_name;
|
||||||
|
|
||||||
g_return_if_fail (GST_IS_DTLS_CONNECTION (self));
|
g_return_if_fail (GST_IS_DTLS_CONNECTION (self));
|
||||||
|
|
||||||
GstDtlsConnectionPrivate *priv = self->priv;
|
priv = self->priv;
|
||||||
GError *error = NULL;
|
|
||||||
gchar *thread_name = g_strdup_printf ("connection_thread_%p", self);
|
thread_name = g_strdup_printf ("connection_thread_%p", self);
|
||||||
|
|
||||||
GST_TRACE_OBJECT (self, "locking @ start_timeout");
|
GST_TRACE_OBJECT (self, "locking @ start_timeout");
|
||||||
g_mutex_lock (&priv->mutex);
|
g_mutex_lock (&priv->mutex);
|
||||||
|
@ -387,13 +395,15 @@ gst_dtls_connection_set_send_callback (GstDtlsConnection * self,
|
||||||
gint
|
gint
|
||||||
gst_dtls_connection_process (GstDtlsConnection * self, gpointer data, gint len)
|
gst_dtls_connection_process (GstDtlsConnection * self, gpointer data, gint len)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_DTLS_CONNECTION (self), 0);
|
GstDtlsConnectionPrivate *priv;
|
||||||
GstDtlsConnectionPrivate *priv = self->priv;
|
|
||||||
gint result;
|
gint result;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GST_IS_DTLS_CONNECTION (self), 0);
|
||||||
g_return_val_if_fail (self->priv->ssl, 0);
|
g_return_val_if_fail (self->priv->ssl, 0);
|
||||||
g_return_val_if_fail (self->priv->bio, 0);
|
g_return_val_if_fail (self->priv->bio, 0);
|
||||||
|
|
||||||
|
priv = self->priv;
|
||||||
|
|
||||||
GST_TRACE_OBJECT (self, "locking @ process");
|
GST_TRACE_OBJECT (self, "locking @ process");
|
||||||
g_mutex_lock (&priv->mutex);
|
g_mutex_lock (&priv->mutex);
|
||||||
GST_TRACE_OBJECT (self, "locked @ process");
|
GST_TRACE_OBJECT (self, "locked @ process");
|
||||||
|
@ -430,9 +440,10 @@ gst_dtls_connection_process (GstDtlsConnection * self, gpointer data, gint len)
|
||||||
gint
|
gint
|
||||||
gst_dtls_connection_send (GstDtlsConnection * self, gpointer data, gint len)
|
gst_dtls_connection_send (GstDtlsConnection * self, gpointer data, gint len)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_DTLS_CONNECTION (self), 0);
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GST_IS_DTLS_CONNECTION (self), 0);
|
||||||
|
|
||||||
g_return_val_if_fail (self->priv->ssl, 0);
|
g_return_val_if_fail (self->priv->ssl, 0);
|
||||||
g_return_val_if_fail (self->priv->bio, 0);
|
g_return_val_if_fail (self->priv->bio, 0);
|
||||||
|
|
||||||
|
@ -762,7 +773,7 @@ static BIO_METHOD custom_bio_methods = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static BIO_METHOD *
|
static BIO_METHOD *
|
||||||
BIO_s_gst_dtls_connection ()
|
BIO_s_gst_dtls_connection (void)
|
||||||
{
|
{
|
||||||
return &custom_bio_methods;
|
return &custom_bio_methods;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue