Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 68760 invoked from network); 16 Feb 2007 13:44:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2007 13:44:33 -0000 Received: (qmail 43499 invoked by uid 500); 16 Feb 2007 13:44:34 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 43480 invoked by uid 500); 16 Feb 2007 13:44:34 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 43462 invoked by uid 99); 16 Feb 2007 13:44:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 05:44:34 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 05:44:26 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 008187141B8 for ; Fri, 16 Feb 2007 05:44:06 -0800 (PST) Message-ID: <28993672.1171633445998.JavaMail.jira@brutus> Date: Fri, 16 Feb 2007 05:44:05 -0800 (PST) From: "Alexei Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Assigned: (HARMONY-3185) [classlib][nio] DatagramChannel.send() does not work if the ByteBuffer is exhausted to it's limit In-Reply-To: <24599923.1171559825732.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexei Zakharov reassigned HARMONY-3185: ---------------------------------------- Assignee: Alexei Zakharov > [classlib][nio] DatagramChannel.send() does not work if the ByteBuffer is exhausted to it's limit > ------------------------------------------------------------------------------------------------- > > Key: HARMONY-3185 > URL: https://issues.apache.org/jira/browse/HARMONY-3185 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: WinXP, IA32 > Reporter: Mikhail Markov > Assigned To: Alexei Zakharov > Attachments: H-3185.patch > > > I have 9 constant fails in nio modules for DatagramChannelTest: > testSend_NoServerTwice(), > testSend_NoServerNonBlockingTwice(), > testReceiveSend_Block_Empty(), > testReceiveSend_NonBlock_Empty(), > testReceiveSend_Block_Empty_S2C(), > testReceiveSend_NonBlock_Empty_S2C(), > testReceiveSend_Block_Empty_C2S(), > testReceiveSend_NonBlock_Empty_C2S(), > testReceiveSend_Empty_S2S() > Here is the simple testcase reproducing the problem: > On RI it silently passes, but on Harmony it fails with this message: "(10040) A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself." > ----------- Test.java -------------- > import java.io.IOException; > import java.net.*; > import java.nio.*; > import java.nio.channels.*; > public class Test { > public static void main (String[] argv) throws Exception { > ByteBuffer writeBuf = ByteBuffer.allocateDirect(200); > DatagramChannel channel = DatagramChannel.open(); > InetSocketAddress localAddr = new InetSocketAddress("127.0.0.1", > getNextPort()); > channel.send(writeBuf, localAddr); > channel.connect(localAddr); > channel.send(writeBuf, localAddr); > } > private static int getNextPort() throws IOException { > ServerSocket ss = new ServerSocket(0); > int port = ss.getLocalPort(); > ss.close(); > return port; > } > } > ------------------------------ > I'll provide a patch soon. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.