8157749: Improve handling of DNS error replies
Reviewed-by: chegar, rriggs, coffeys
This commit is contained in:
parent
7d3e084125
commit
6caa8f09c4
@ -273,13 +273,10 @@ int cmpScopeID (unsigned int scope, struct sockaddr *him) {
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
NET_ThrowByNameWithLastError(JNIEnv *env, const char *name,
|
||||
const char *defaultDetail) {
|
||||
char errmsg[255];
|
||||
sprintf(errmsg, "errno: %d, error: %s\n", errno, defaultDetail);
|
||||
JNU_ThrowByNameWithLastError(env, name, errmsg);
|
||||
JNU_ThrowByNameWithMessageAndLastError(env, name, defaultDetail);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -205,9 +205,7 @@ NET_ThrowCurrent(JNIEnv *env, char *msg)
|
||||
void
|
||||
NET_ThrowByNameWithLastError(JNIEnv *env, const char *name,
|
||||
const char *defaultDetail) {
|
||||
char errmsg[255];
|
||||
sprintf(errmsg, "errno: %d, error: %s\n", WSAGetLastError(), defaultDetail);
|
||||
JNU_ThrowByNameWithLastError(env, name, errmsg);
|
||||
JNU_ThrowByNameWithMessageAndLastError(env, name, defaultDetail);
|
||||
}
|
||||
|
||||
jfieldID
|
||||
|
Loading…
x
Reference in New Issue
Block a user