[Spice-devel] [spice-gtk v2 3/3] ssl: Use accessors rather than direct struct access
Christophe Fergeau
cfergeau at redhat.com
Wed Jan 11 16:46:29 UTC 2017
On Wed, Jan 11, 2017 at 04:37:01PM +0100, Pavel Grunt wrote:
> On Wed, 2017-01-11 at 10:50 +0100, Christophe Fergeau wrote:
> > From: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
> >
> > In OpenSSL 1.1.0, the struct fields are private so we can no longer
> > directly access them.
> >
> > The accessors are not available in previous OpenSSL releases, so we
> > need
> > to add compat helpers.
> > ---
> > src/bio-gio.c | 108
> > ++++++++++++++++++++++++++++++++++++++++++++--------
> > src/spice-channel.c | 11 +++++-
> > 2 files changed, 102 insertions(+), 17 deletions(-)
> >
> > diff --git a/src/bio-gio.c b/src/bio-gio.c
> > index 0f8b415..ef47cd3 100644
> > --- a/src/bio-gio.c
> > +++ b/src/bio-gio.c
> > @@ -83,30 +152,37 @@ static int bio_gio_puts(BIO *bio, const char
> > *str)
> > return ret;
> > }
> >
> > -#define BIO_TYPE_START 128
> > +static BIO_METHOD *bio_gio_method;
> >
> > G_GNUC_INTERNAL
> > BIO* bio_new_giostream(GIOStream *stream)
> > {
> > BIO *bio;
> > - static BIO_METHOD bio_gio_method;
> >
> > - if (bio_gio_method.name == NULL) {
> > - bio_gio_method.type = BIO_TYPE_START |
> > BIO_TYPE_SOURCE_SINK;
> > - bio_gio_method.name = "gio stream";
> > + if (!bio_gio_method) {
> > + int index = BIO_get_new_index();
> > + g_warning("index: %i", index);
>
> probably a leftover ^
Oops.. Removed these 2 lines!
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170111/924ee3ff/attachment.sig>
More information about the Spice-devel
mailing list