473 |
} |
} |
474 |
|
|
475 |
if (stream) |
if (stream) |
476 |
_javanet_set_int_field(env, this, "java/net/PlainSocketImpl", |
_javanet_set_int_field(env, this, "gnu/java/net/PlainSocketImpl", |
477 |
"native_fd", fd); |
"native_fd", fd); |
478 |
else |
else |
479 |
_javanet_set_int_field(env, this, "java/net/PlainDatagramSocketImpl", |
_javanet_set_int_field(env, this, "gnu/java/net/PlainDatagramSocketImpl", |
480 |
"native_fd", fd); |
"native_fd", fd); |
481 |
#else /* not WITHOUT_NETWORK */ |
#else /* not WITHOUT_NETWORK */ |
482 |
#endif /* not WITHOUT_NETWORK */ |
#endif /* not WITHOUT_NETWORK */ |
505 |
TARGET_NATIVE_NETWORK_SOCKET_CLOSE(fd,result); |
TARGET_NATIVE_NETWORK_SOCKET_CLOSE(fd,result); |
506 |
|
|
507 |
if (stream) |
if (stream) |
508 |
_javanet_set_int_field(env, this, "java/net/PlainSocketImpl", |
_javanet_set_int_field(env, this, "gnu/java/net/PlainSocketImpl", |
509 |
"native_fd", -1); |
"native_fd", -1); |
510 |
else |
else |
511 |
_javanet_set_int_field(env, this, "java/net/PlainDatagramSocketImpl", |
_javanet_set_int_field(env, this, "gnu/java/net/PlainDatagramSocketImpl", |
512 |
"native_fd", -1); |
"native_fd", -1); |
513 |
#else /* not WITHOUT_NETWORK */ |
#else /* not WITHOUT_NETWORK */ |
514 |
#endif /* not WITHOUT_NETWORK */ |
#endif /* not WITHOUT_NETWORK */ |
798 |
} |
} |
799 |
|
|
800 |
/* Populate instance variables */ |
/* Populate instance variables */ |
801 |
_javanet_set_int_field(env, impl, "java/net/PlainSocketImpl", "native_fd", |
_javanet_set_int_field(env, impl, "gnu/java/net/PlainSocketImpl", "native_fd", |
802 |
newfd); |
newfd); |
803 |
|
|
804 |
if ((*env)->ExceptionOccurred(env)) |
if ((*env)->ExceptionOccurred(env)) |