From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Binary network communication appears broken Date: Thu, 27 Mar 2008 14:52:18 -0400 Message-ID: References: <20080327.175150.135754245.hanche@math.ntnu.no> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206643966 16480 80.91.229.12 (27 Mar 2008 18:52:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Mar 2008 18:52:46 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Harald Hanche-Olsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 27 19:53:17 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JexDx-00054k-0Q for ged-emacs-devel@m.gmane.org; Thu, 27 Mar 2008 19:53:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JexDL-0002IG-Dp for ged-emacs-devel@m.gmane.org; Thu, 27 Mar 2008 14:52:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JexDH-0002IA-Sh for emacs-devel@gnu.org; Thu, 27 Mar 2008 14:52:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JexDF-0002He-3X for emacs-devel@gnu.org; Thu, 27 Mar 2008 14:52:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JexDE-0002Hb-Vr for emacs-devel@gnu.org; Thu, 27 Mar 2008 14:52:33 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JexDE-0001mI-KY for emacs-devel@gnu.org; Thu, 27 Mar 2008 14:52:32 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JexDE-0006SJ-Bj for emacs-pretest-bug@gnu.org; Thu, 27 Mar 2008 14:52:32 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JexDB-0001kk-7d for emacs-pretest-bug@gnu.org; Thu, 27 Mar 2008 14:52:32 -0400 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JexDA-0001ke-Vx for emacs-pretest-bug@gnu.org; Thu, 27 Mar 2008 14:52:29 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 9B1E42CFA8F; Thu, 27 Mar 2008 14:52:28 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 39D5F3FE0; Thu, 27 Mar 2008 14:52:18 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 19C7B6C7CF; Thu, 27 Mar 2008 14:52:18 -0400 (EDT) In-Reply-To: <20080327.175150.135754245.hanche@math.ntnu.no> (Harald Hanche-Olsen's message of "Thu, 27 Mar 2008 17:51:50 +0100 (CET)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:93652 gmane.emacs.pretest.bugs:21726 Archived-At: > I discovered this because it breaks mew: > (This is with CVS emacs as of yesterday. > I spent many hours debugging my way to this simple test case.) > Define this function: > (defun test-net (coding) > (interactive "SUse coding: ") > (make-network-process > :name "testproc" > :host 'local :service 9898 :family 'ipv4 > :buffer "*testproc*" > :coding coding > :filter (lambda (proc string) > (setq *test* string )) > :sentinel (lambda (proc string) > (delete-process proc)))) Thank you very much for your efforts. Does the patch below help? Stefan --- coding.c.~1.374.~ 2008-03-25 11:59:11.000000000 -0400 +++ coding.c 2008-03-27 14:51:31.000000000 -0400 @@ -7030,10 +7030,10 @@ || (! NILP (CODING_ATTR_POST_READ (attrs)) && NILP (dst_object))) { - coding->dst_object = code_conversion_save (1, 1); + coding->dst_multibyte = !CODING_FOR_UNIBYTE (coding); + coding->dst_object = code_conversion_save (1, coding->dst_multibyte); coding->dst_pos = BEG; coding->dst_pos_byte = BEG_BYTE; - coding->dst_multibyte = !CODING_FOR_UNIBYTE (coding); } else if (BUFFERP (dst_object)) {