unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Harald Hanche-Olsen <hanche@math.ntnu.no>
Cc: emacs-pretest-bug@gnu.org
Subject: Re: Binary network communication appears broken
Date: Thu, 27 Mar 2008 14:52:18 -0400	[thread overview]
Message-ID: <jwviqz8m24i.fsf-monnier+emacsbugreports@gnu.org> (raw)
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)")

> 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))
     {




  reply	other threads:[~2008-03-27 18:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27 16:51 Binary network communication appears broken Harald Hanche-Olsen
2008-03-27 18:52 ` Stefan Monnier [this message]
2008-03-27 20:09   ` Harald Hanche-Olsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwviqz8m24i.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=hanche@math.ntnu.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).