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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NET_ThrowByNameWithLastError(JNIEnv *env, const char *name,
|
NET_ThrowByNameWithLastError(JNIEnv *env, const char *name,
|
||||||
const char *defaultDetail) {
|
const char *defaultDetail) {
|
||||||
char errmsg[255];
|
JNU_ThrowByNameWithMessageAndLastError(env, name, defaultDetail);
|
||||||
sprintf(errmsg, "errno: %d, error: %s\n", errno, defaultDetail);
|
|
||||||
JNU_ThrowByNameWithLastError(env, name, errmsg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -205,9 +205,7 @@ NET_ThrowCurrent(JNIEnv *env, char *msg)
|
|||||||
void
|
void
|
||||||
NET_ThrowByNameWithLastError(JNIEnv *env, const char *name,
|
NET_ThrowByNameWithLastError(JNIEnv *env, const char *name,
|
||||||
const char *defaultDetail) {
|
const char *defaultDetail) {
|
||||||
char errmsg[255];
|
JNU_ThrowByNameWithMessageAndLastError(env, name, defaultDetail);
|
||||||
sprintf(errmsg, "errno: %d, error: %s\n", WSAGetLastError(), defaultDetail);
|
|
||||||
JNU_ThrowByNameWithLastError(env, name, errmsg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jfieldID
|
jfieldID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user