patch for compile warning and openssl ver <0.9.8, based on v1.8.0 release
Xiaoqiang Chen <[email protected]> Thu, 29 Aug 2013 00:08:42 +0800
| Newsgroups | gmane.network.rdesktop.devel |
|---|---|
| Message-ID | <CAK1fGLERJXPjWFAvWfkeKTg9xYfTLE8xGL-3tqS4B1pAg0U-_A@mail.gmail.com> |
--===============6293706534699419605==
Content-Type: multipart/alternative; boundary=047d7b111e75718ec904e504361a
--047d7b111e75718ec904e504361a
Content-Type: text/plain; charset=UTF-8
1. On network error, return NULL rather than an empty return statement to
conform with function signature.
2. SSL_OP_NO_COMPRESSION is only available for openssl ver >=0.9.8 so check
it before adding the flag.
ref: https://github.com/mxcl/homebrew/pull/22116
diff --git a/tcp.c b/tcp.c
index a541e45..943a655 100644
--- a/tcp.c
+++ b/tcp.c
@@ -193,7 +193,7 @@ tcp_recv(STREAM s, uint32 length)
int rcvd = 0, ssl_err;
if (g_network_error == True)
- return;
+ return NULL;
if (s == NULL)
{
@@ -318,7 +318,9 @@ tcp_tls_connect(void)
}
options = 0;
+#ifdef SSL_OP_NO_COMPRESSION
options |= SSL_OP_NO_COMPRESSION;
+#endif
options |= SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
SSL_CTX_set_options(g_ssl_ctx, options);
}
--047d7b111e75718ec904e504361a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><span style=3D"font-family:arial,sans-serif;font-size:13px=
">1. On network error, return NULL rather than an empty return statement to=
conform with function signature.</span><br><div dir=3D"ltr" style=3D"font-=
family:arial,sans-serif;font-size:13px">
<div>2. SSL_OP_NO_COMPRESSION is only available for openssl ver >=3D0.9.=
8 so check it before adding the flag.</div><div><br></div><div><br></div><d=
iv>ref:=C2=A0<a href=3D"https://github.com/mxcl/homebrew/pull/22116" target=
=3D"_blank">https://github.com/mxcl/homebrew/pull/22116</a><br>
</div><div><br></div><div>diff --git a/tcp.c b/tcp.c</div><div>index a541e4=
5..943a655 100644</div><div>--- a/tcp.c</div><div>+++ b/tcp.c</div><div>@@ =
-193,7 +193,7 @@ tcp_recv(STREAM s, uint32 length)</div><div>=C2=A0 =C2=A0i=
nt rcvd =3D 0, ssl_err;</div>
<div>=C2=A0</div><div>=C2=A0 =C2=A0if (g_network_error =3D=3D True)</div><d=
iv>- =C2=A0 =C2=A0return;</div><div>+ =C2=A0 =C2=A0return NULL;</div><div>=
=C2=A0</div><div>=C2=A0 =C2=A0if (s =3D=3D NULL)</div><div>=C2=A0 =C2=A0{</=
div><div>@@ -318,7 +318,9 @@ tcp_tls_connect(void)</div><div>=C2=A0 =C2=A0 =
=C2=A0}</div>
<div>=C2=A0</div><div>=C2=A0 =C2=A0 =C2=A0options =3D 0;</div><div>+#ifdef =
SSL_OP_NO_COMPRESSION</div><div>=C2=A0 =C2=A0 =C2=A0options |=3D SSL_OP_NO_=
COMPRESSION;</div><div>+#endif</div><div>=C2=A0 =C2=A0 =C2=A0options |=3D S=
SL_OP_DONT_INSERT_EMPTY_FRAGMENTS;</div><div>=C2=A0 =C2=A0 =C2=A0SSL_CTX_se=
t_options(g_ssl_ctx, options);</div>
<div>=C2=A0 =C2=A0}</div></div>
</div>
--047d7b111e75718ec904e504361a--
--===============6293706534699419605==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
--===============6293706534699419605==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
rdesktop-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdesktop-devel
--===============6293706534699419605==--