From: Robert Pluim <rpluim@gmail.com>
To: Vasilij Schneidermann <mail@vasilij.de>
Cc: 62990@debbugs.gnu.org
Subject: bug#62990: 30.0.50; UDP server closes connection upon receiving an empty packet
Date: Wed, 26 Apr 2023 16:31:54 +0200 [thread overview]
Message-ID: <877ctysoit.fsf@gmail.com> (raw)
In-Reply-To: <87jzxysw06.fsf@gmail.com> (Robert Pluim's message of "Wed, 26 Apr 2023 13:50:17 +0200")
>>>>> On Wed, 26 Apr 2023 13:50:17 +0200, Robert Pluim <rpluim@gmail.com> said:
>>>>> On Wed, 26 Apr 2023 12:56:39 +0200, Vasilij Schneidermann <mail@vasilij.de> said:
Vasilij> Thank you. Yes, that is the case, the network process is no longer shut
Vasilij> down, but the 0-length message isn't picked up. It prints the following:
Vasilij> Received string (5): "hello"
Vasilij> Received string (5): "world"
Vasilij> Rather than the expected:
Vasilij> Received string (5): "hello"
Vasilij> Received string (0): ""
Vasilij> Received string (5): "world"
Robert> Right. Getting emacs to deliver a zero length string to the UDP
Robert> process would be quite a change, one I canʼt get to any time soon.
Actually, it turned out to be a small change (on top of my previous
patch)
diff --git a/src/process.c b/src/process.c
index e3233f5ad89..eca1441062d 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6305,7 +6305,13 @@ read_and_dispose_of_process_output (struct Lisp_Process *p, char *chars,
coding->carryover_bytes);
p->decoding_carryover = coding->carryover_bytes;
}
- if (SBYTES (text) > 0)
+ if (SBYTES (text) > 0
+#ifdef DATAGRAM_SOCKETS
+ || (SBYTES (text) == 0
+ && 0 <= p->outfd
+ && DATAGRAM_CHAN_P (p->outfd))
+#endif
+ )
/* FIXME: It's wrong to wrap or not based on debug-on-error, and
sometimes it's simply wrong to wrap (e.g. when called from
accept-process-output). */
Robert
--
next prev parent reply other threads:[~2023-04-26 14:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 10:36 bug#62990: 30.0.50; UDP server closes connection upon receiving an empty packet Vasilij Schneidermann
2023-04-24 8:51 ` Robert Pluim
2023-04-24 21:04 ` Vasilij Schneidermann
2023-04-25 8:07 ` Robert Pluim
2023-04-26 9:14 ` Robert Pluim
2023-04-26 10:30 ` Eli Zaretskii
2023-04-26 10:35 ` Robert Pluim
2023-04-26 10:38 ` Eli Zaretskii
2023-04-26 11:47 ` Robert Pluim
2023-04-26 12:24 ` Eli Zaretskii
2023-04-26 14:27 ` Robert Pluim
2023-04-26 10:58 ` Vasilij Schneidermann
2023-04-26 10:56 ` Vasilij Schneidermann
2023-04-26 11:50 ` Robert Pluim
2023-04-26 14:31 ` Robert Pluim [this message]
2024-03-09 13:40 ` Vasilij Schneidermann
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877ctysoit.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=62990@debbugs.gnu.org \
--cc=mail@vasilij.de \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.