return sockaddr_from_praddr(&addr, len);
}
-/**
- * camel_tcp_stream_ssl_sockfd:
- * @stream: a #CamelTcpStreamSSL
- *
- * FIXME Document me!
- *
- * Since: 2.30
- **/
-PRFileDesc *
-camel_tcp_stream_ssl_sockfd (CamelTcpStreamSSL *stream)
+static PRFileDesc *
+tcp_stream_ssl_get_file_desc (CamelTcpStream *stream)
{
- return stream->priv->sockfd;
+ CamelTcpStreamSSL *ssl = CAMEL_TCP_STREAM_SSL (stream);
+
+ return ssl->priv->sockfd;
}
static void
tcp_stream_class->setsockopt = tcp_stream_ssl_setsockopt;
tcp_stream_class->get_local_address = tcp_stream_ssl_get_local_address;
tcp_stream_class->get_remote_address = tcp_stream_ssl_get_remote_address;
+ tcp_stream_class->get_file_desc = tcp_stream_ssl_get_file_desc;
}
static void
PRPollDesc pollfds[2] = { };
gint res;
- pollfds[0].fd = camel_tcp_stream_ssl_sockfd ((CamelTcpStreamSSL *)is->stream->source);
+ pollfds[0].fd = camel_tcp_stream_get_file_desc (CAMEL_TCP_STREAM (is->stream->source));
pollfds[0].in_flags = PR_POLL_READ;
pollfds[1].fd = camel_operation_cancel_prfd (op);
pollfds[1].in_flags = PR_POLL_READ;