< prev index next >
src/java.base/windows/native/libnet/TwoStacksPlainSocketImpl.c
Print this page
rev 14890 : 8158023: SocketExceptions contain too little information sometimes
*** 1,7 ****
/*
! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 1052,1063 ****
*/
fd = getFD1 (env, this);
}
if (getsockname(fd, (struct sockaddr *)&him, &len) < 0) {
! NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException",
! "Error getting socket name");
return -1;
}
iaObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&him, &port);
CHECK_NULL_RETURN(iaObj, -1);
--- 1052,1063 ----
*/
fd = getFD1 (env, this);
}
if (getsockname(fd, (struct sockaddr *)&him, &len) < 0) {
! JNU_ThrowByNameWithMessageAndLastError
! (env, JNU_JAVANETPKG "SocketException", "Error getting socket name");
return -1;
}
iaObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&him, &port);
CHECK_NULL_RETURN(iaObj, -1);
< prev index next >