goffset write_length;
goffset written;
- guint read_tag, write_tag, tls_signal_id;
+ guint read_tag, write_tag;
GSource *unpause_source;
SoupMessageGetHeadersFn get_headers_cb;
return;
priv->io_data = NULL;
- if (io->tls_signal_id)
- g_signal_handler_disconnect (io->sock, io->tls_signal_id);
if (io->sock)
g_object_unref (io->sock);
if (io->item)
goto read_more;
}
-static void
-socket_tls_certificate_changed (GObject *sock, GParamSpec *pspec,
- gpointer msg)
-{
- GTlsCertificate *certificate;
- GTlsCertificateFlags errors;
-
- g_object_get (sock,
- SOUP_SOCKET_TLS_CERTIFICATE, &certificate,
- SOUP_SOCKET_TLS_ERRORS, &errors,
- NULL);
- g_object_set (msg,
- SOUP_MESSAGE_TLS_CERTIFICATE, certificate,
- SOUP_MESSAGE_TLS_ERRORS, errors,
- NULL);
- if (certificate)
- g_object_unref (certificate);
-}
-
static SoupMessageIOData *
new_iostate (SoupMessage *msg, SoupSocket *sock, SoupMessageIOMode mode,
SoupMessageGetHeadersFn get_headers_cb,
io->write_state = SOUP_MESSAGE_IO_STATE_NOT_STARTED;
if (soup_socket_is_ssl (io->sock)) {
- io->tls_signal_id = g_signal_connect (io->sock, "notify::tls-certificate",
- G_CALLBACK (socket_tls_certificate_changed), msg);
+ GTlsCertificate *certificate;
+ GTlsCertificateFlags errors;
+
+ g_object_get (sock,
+ SOUP_SOCKET_TLS_CERTIFICATE, &certificate,
+ SOUP_SOCKET_TLS_ERRORS, &errors,
+ NULL);
+ g_object_set (msg,
+ SOUP_MESSAGE_TLS_CERTIFICATE, certificate,
+ SOUP_MESSAGE_TLS_ERRORS, errors,
+ NULL);
+ if (certificate)
+ g_object_unref (certificate);
+ } else {
+ g_object_set (msg,
+ SOUP_MESSAGE_TLS_CERTIFICATE, NULL,
+ SOUP_MESSAGE_TLS_ERRORS, 0,
+ NULL);
}
if (priv->io_data)