new: [PATCH series for win32]

Nikos Mavrogiannopoulos nmav at gnutls.org
Mon Sep 29 11:04:26 PDT 2014


On Mon, 2014-09-29 at 14:39 +0100, David Woodhouse wrote:
> On Fri, 2014-09-26 at 20:48 +0200, Nikos Mavrogiannopoulos wrote:
> > 
> > I've gave up with FormatString and simply print GetLastError. The
> > patch
> > set is attached, and it includes a 5th patch to avoid perror().
> 
> Patches 1, 2 and 4 aren't changed from what's in my api4.0 branch, are
> they?

They are identical to the ones I've sent before, so they should be the
same.

> For the string ownership thing I think we're almost there, and the Java
> bits seem to be working. We do need to fix gnutls_get_cert_details()
> which currently returns an allocated string for the caller to free. 

You could provide a function for the caller to use to free it.

> I
> suspect we should just cache it in the vpninfo struct and free it later
> (or the next time the function is called), rather than giving the caller
> any way to free it individually?

That way the API would be tricky to use (e.g., a call from a different
thread).

> I think we should also be auditing all usage of free() vs. gnutls_free()
> for similar reasons, shouldn't we? If libopenconnect and libgnutls are
> running with different C runtimes, we'll have problems there too? 

If all memory got from gnutls is deallocated with gnutls_free() there
shouldn't be any problem.

> Finally — on your last patch, you've made some changes to translated
> strings:
> -		perror(_("UDP (DTLS) connect:\n"));
> +		vpn_progress(vpninfo, PRG_ERR, _("UDP (DTLS) connect: %s\n"), strerror(errno));
> It'd be really useful if you could preserve the existing translations by
> adding the ' %s' to the relevant msgstr entries, please.

Isn't that automatically generated with update-po?

regards,
Nikos





More information about the openconnect-devel mailing list