< prev index next >

src/jdk.sctp/unix/native/libsctp/SctpChannelImpl.c

Print this page
rev 59383 : [mq]: final

*** 1,7 **** /* ! * Copyright (c) 2009, 2018, 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) 2009, 2020, 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
*** 324,337 **** case SCTP_ADDR_ADDED : event = sun_nio_ch_sctp_PeerAddrChange_SCTP_ADDR_ADDED; break; case SCTP_ADDR_MADE_PRIM : event = sun_nio_ch_sctp_PeerAddrChange_SCTP_ADDR_MADE_PRIM; - #ifdef __linux__ /* Solaris currently doesn't support SCTP_ADDR_CONFIRMED */ break; case SCTP_ADDR_CONFIRMED : event = sun_nio_ch_sctp_PeerAddrChange_SCTP_ADDR_CONFIRMED; #endif /* __linux__ */ } addressObj = SockAddrToInetSocketAddress(env, (struct sockaddr*)&spc->spc_aaddr); CHECK_NULL(addressObj); --- 324,338 ---- case SCTP_ADDR_ADDED : event = sun_nio_ch_sctp_PeerAddrChange_SCTP_ADDR_ADDED; break; case SCTP_ADDR_MADE_PRIM : event = sun_nio_ch_sctp_PeerAddrChange_SCTP_ADDR_MADE_PRIM; break; + #ifdef __linux__ case SCTP_ADDR_CONFIRMED : event = sun_nio_ch_sctp_PeerAddrChange_SCTP_ADDR_CONFIRMED; + break; #endif /* __linux__ */ } addressObj = SockAddrToInetSocketAddress(env, (struct sockaddr*)&spc->spc_aaddr); CHECK_NULL(addressObj);
*** 477,500 **** return 0; } bufp = newBuf; rv += rvSAVE; } - #ifdef __sparc - else if ((intptr_t)addr & 0x3) { - /* the given buffer is not 4 byte aligned */ - char* newBuf; - if ((newBuf = malloc(SCTP_NOTIFICATION_SIZE)) == NULL) { - JNU_ThrowOutOfMemoryError(env, "Out of native heap space."); - return -1; - } - allocated = JNI_TRUE; - - memcpy(newBuf, addr, rv); - bufp = newBuf; - } - #endif snp = (union sctp_notification *) bufp; if (handleNotification(env, fd, resultContainerObj, snp, rv, (msg->msg_flags & MSG_EOR), &sa.sa) == JNI_TRUE) { /* We have received a notification that is of interest --- 478,487 ----
< prev index next >