Re: WSAGetLastError usage in jdk/src/java.base/windows/native/libnet/SocketInputStream.c

2018-08-28 Thread Thomas Stüfe
On Tue, Aug 28, 2018 at 5:56 PM, Baesken, Matthias wrote: >> not strictly necessary, since WSAGetLastError() only refers to socket calls > > I'll try to find out more about this. > >> However, I think your proposal is fine for code cleanliness sake. > > Yes , then I will do it for code cleanliness

RE: WSAGetLastError usage in jdk/src/java.base/windows/native/libnet/SocketInputStream.c

2018-08-28 Thread Baesken, Matthias
> not strictly necessary, since WSAGetLastError() only refers to socket calls I'll try to find out more about this. > However, I think your proposal is fine for code cleanliness sake. Yes , then I will do it for code cleanliness sake (and because MS recommends anyway to get the error immediatel

Re: [XS] RFR: 8209994: windows: Java_java_net_NetworkInterface_getAll misses releasing interface-list

2018-08-28 Thread Brian Burkhalter
+3 Thanks, Brian On Aug 28, 2018, at 12:19 AM, Baesken, Matthias wrote: > looking at the coding, your sceanario ***should*** not happen ; however > to be on the safe side it is for sure better to do the initialization > you propose. > > Looking a bit more at the coding, there is a

RE: [XS] RFR: 8209994: windows: Java_java_net_NetworkInterface_getAll misses releasing interface-list

2018-08-28 Thread Baesken, Matthias
Thanks Chris ! > -Original Message- > From: Chris Hegarty > Sent: Dienstag, 28. August 2018 16:30 > To: Baesken, Matthias > Cc: Volker Simonis ; net-dev d...@openjdk.java.net>; Brian Burkhalter > Subject: Re: [XS] RFR: 8209994: windows: > Java_java_net_NetworkInterface_getAll misses re

Re: [XS] RFR: 8209994: windows: Java_java_net_NetworkInterface_getAll misses releasing interface-list

2018-08-28 Thread Chris Hegarty
> On 28 Aug 2018, at 15:25, Baesken, Matthias wrote: > > Thanks Volki ! > Can I have a second review please ? Reviewed. -Chris. > Best regards, Matthias > >> -Original Message- >> From: Volker Simonis >> Sent: Dienstag, 28. August 2018 14:07 >> To: Baesken, Matthias >> Cc: net-dev

RE: [XS] RFR: 8209994: windows: Java_java_net_NetworkInterface_getAll misses releasing interface-list

2018-08-28 Thread Baesken, Matthias
Thanks Volki ! Can I have a second review please ? Best regards, Matthias > -Original Message- > From: Volker Simonis > Sent: Dienstag, 28. August 2018 14:07 > To: Baesken, Matthias > Cc: net-dev ; Chris Hegarty > ; Brian Burkhalter > > Subject: Re: [XS] RFR: 8209994: windows: > Java_j

Re: WSAGetLastError usage in jdk/src/java.base/windows/native/libnet/SocketInputStream.c

2018-08-28 Thread Thomas Stüfe
Hi Matthias, not strictly necessary, since WSAGetLastError() only refers to socket calls and GetIntField() is unlikely to call socket functions... However, I think your proposal is fine for code cleanliness sake. Best Regards, Thomas On Tue, Aug 28, 2018 at 2:13 PM, Baesken, Matthias wrote: > H

WSAGetLastError usage in jdk/src/java.base/windows/native/libnet/SocketInputStream.c

2018-08-28 Thread Baesken, Matthias
Hello, the MSDN docu about WSAGetLastError warns to get the error-code ***immediately*** after occurance. See : https://msdn.microsoft.com/de-de/library/windows/desktop/ms741580(v=vs.85).aspx " ... If a function call's return value indicates that error or other relevant data was returned in the

Re: [XS] RFR: 8209994: windows: Java_java_net_NetworkInterface_getAll misses releasing interface-list

2018-08-28 Thread Volker Simonis
Thanks for updating the change. Looks good now! Regards, Volker On Tue, Aug 28, 2018 at 9:19 AM Baesken, Matthias wrote: > > > > > the change looks good but I think you should also initialize 'ifList' > > in 'Java_java_net_NetworkInterface_getAll()' with NULL otherwise its > > value is undefined

RE: [XS] RFR: 8209994: windows: Java_java_net_NetworkInterface_getAll misses releasing interface-list

2018-08-28 Thread Baesken, Matthias
> > the change looks good but I think you should also initialize 'ifList' > in 'Java_java_net_NetworkInterface_getAll()' with NULL otherwise its > value is undefined and if 'enumInterfaces()' returns with an error > without assigning 'ifList' you may end up calling 'free_netif()' with > an undefin