unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails
@ 2016-05-15  1:36 Ken Brown
  2016-05-15 12:16 ` Ken Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Brown @ 2016-05-15  1:36 UTC (permalink / raw)
  To: 23540; +Cc: Lars Ingebrigtsen

Commit b73e525, as corrected by commit 4639bc9, causes the test 
make-ipv4-tcp-server-with-unspecified-port in 
test/lisp/net/network-streams-tests.el to fail with the error

   Invalid argument 4 of operation `open-network-stream'.

What happens is that make-network-process calls 
set_network_socket_coding_system, which calls open-network-stream with 
service eq t, which leads to the error in a way that I haven't sorted out.


In GNU Emacs 25.1.50.6 (x86_64-unknown-cygwin, GTK+ Version 3.18.9)
  of 2016-05-14 built on moufang
Repository revision: b73e5254ea9056ee2088ed096ef1de3ef8699855
Windowing system distributor 'The Cygwin/X Project', version 11.0.11802000
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails
  2016-05-15  1:36 bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails Ken Brown
@ 2016-05-15 12:16 ` Ken Brown
  2016-05-15 16:15   ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Brown @ 2016-05-15 12:16 UTC (permalink / raw)
  To: 23540; +Cc: Lars Ingebrigtsen

On 5/14/2016 9:36 PM, Ken Brown wrote:
> Commit b73e525, as corrected by commit 4639bc9, causes the test
> make-ipv4-tcp-server-with-unspecified-port in
> test/lisp/net/network-streams-tests.el to fail with the error
>
>   Invalid argument 4 of operation `open-network-stream'.
>
> What happens is that make-network-process calls
> set_network_socket_coding_system, which calls open-network-stream with
> service eq t, which leads to the error in a way that I haven't sorted out.

I didn't get that last step right.  The error is generated by 
Ffind_operation_coding_system when it is called by

CALLN (Ffind_operation_coding_system,
	Qopen_network_stream, name, p->buffer,
	host, service)

in set_network_socket_coding_system.

Ken





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails
  2016-05-15 12:16 ` Ken Brown
@ 2016-05-15 16:15   ` Eli Zaretskii
  2016-05-15 17:08     ` Ken Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-05-15 16:15 UTC (permalink / raw)
  To: Ken Brown; +Cc: 23540, larsi

> From: Ken Brown <kbrown@cornell.edu>
> Date: Sun, 15 May 2016 08:16:34 -0400
> Cc: Lars Ingebrigtsen <larsi@gnus.org>
> 
> On 5/14/2016 9:36 PM, Ken Brown wrote:
> > Commit b73e525, as corrected by commit 4639bc9, causes the test
> > make-ipv4-tcp-server-with-unspecified-port in
> > test/lisp/net/network-streams-tests.el to fail with the error
> >
> >   Invalid argument 4 of operation `open-network-stream'.
> >
> > What happens is that make-network-process calls
> > set_network_socket_coding_system, which calls open-network-stream with
> > service eq t, which leads to the error in a way that I haven't sorted out.
> 
> I didn't get that last step right.  The error is generated by 
> Ffind_operation_coding_system when it is called by
> 
> CALLN (Ffind_operation_coding_system,
> 	Qopen_network_stream, name, p->buffer,
> 	host, service)
> 
> in set_network_socket_coding_system.

Ffind_operation_coding_system includes an explicit test for the 4th
argument to be an integer:

  if (!(STRINGP (target)
	|| (EQ (operation, Qinsert_file_contents) && CONSP (target)
	    && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
	|| (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    error ("Invalid argument %"pI"d of operation `%s'",
	   XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));

This should obviously be augmented, now that the value can also be t.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails
  2016-05-15 16:15   ` Eli Zaretskii
@ 2016-05-15 17:08     ` Ken Brown
  2016-05-24 15:09       ` Ken Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Brown @ 2016-05-15 17:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 23540, larsi

On 5/15/2016 12:15 PM, Eli Zaretskii wrote:
>> From: Ken Brown <kbrown@cornell.edu>
>> The error is generated by
>> Ffind_operation_coding_system when it is called by
>>
>> CALLN (Ffind_operation_coding_system,
>> 	Qopen_network_stream, name, p->buffer,
>> 	host, service)
>>
>> in set_network_socket_coding_system.
>
> Ffind_operation_coding_system includes an explicit test for the 4th
> argument to be an integer:
>
>   if (!(STRINGP (target)
> 	|| (EQ (operation, Qinsert_file_contents) && CONSP (target)
> 	    && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
> 	|| (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     error ("Invalid argument %"pI"d of operation `%s'",
> 	   XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
>
> This should obviously be augmented, now that the value can also be t.

Presumably the documentation of open-network-stream should also be 
updated to reflect this.  I hesitate to do this myself without knowing 
for sure that t is an acceptable value for all calls to 
open-network-stream.  I'd rather leave it for someone more familiar with 
the code, like Lars.

Ken






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails
  2016-05-15 17:08     ` Ken Brown
@ 2016-05-24 15:09       ` Ken Brown
  2016-05-24 15:27         ` Eli Zaretskii
  2019-10-23 10:32         ` Lars Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Ken Brown @ 2016-05-24 15:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 23540, larsi

On 5/15/2016 1:08 PM, Ken Brown wrote:
> On 5/15/2016 12:15 PM, Eli Zaretskii wrote:
>> Ffind_operation_coding_system includes an explicit test for the 4th
>> argument to be an integer:
>>
>>   if (!(STRINGP (target)
>>     || (EQ (operation, Qinsert_file_contents) && CONSP (target)
>>         && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
>>     || (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
>>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>     error ("Invalid argument %"pI"d of operation `%s'",
>>        XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
>>
>> This should obviously be augmented, now that the value can also be t.
>
> Presumably the documentation of open-network-stream should also be
> updated to reflect this.  I hesitate to do this myself without knowing
> for sure that t is an acceptable value for all calls to
> open-network-stream.  I'd rather leave it for someone more familiar with
> the code, like Lars.

I went ahead and installed the obvious fix, to get rid of the test 
failure.  I'm leaving the bug open because someone knowledgeable still 
needs to update the documentation of open-network-stream.

Ken






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails
  2016-05-24 15:09       ` Ken Brown
@ 2016-05-24 15:27         ` Eli Zaretskii
  2019-10-23 10:32         ` Lars Ingebrigtsen
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2016-05-24 15:27 UTC (permalink / raw)
  To: Ken Brown; +Cc: 23540, larsi

> Cc: 23540@debbugs.gnu.org, larsi@gnus.org
> From: Ken Brown <kbrown@cornell.edu>
> Date: Tue, 24 May 2016 11:09:00 -0400
> 
> On 5/15/2016 1:08 PM, Ken Brown wrote:
> > On 5/15/2016 12:15 PM, Eli Zaretskii wrote:
> >> Ffind_operation_coding_system includes an explicit test for the 4th
> >> argument to be an integer:
> >>
> >>   if (!(STRINGP (target)
> >>     || (EQ (operation, Qinsert_file_contents) && CONSP (target)
> >>         && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
> >>     || (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
> >>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >>     error ("Invalid argument %"pI"d of operation `%s'",
> >>        XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
> >>
> >> This should obviously be augmented, now that the value can also be t.
> >
> > Presumably the documentation of open-network-stream should also be
> > updated to reflect this.  I hesitate to do this myself without knowing
> > for sure that t is an acceptable value for all calls to
> > open-network-stream.  I'd rather leave it for someone more familiar with
> > the code, like Lars.
> 
> I went ahead and installed the obvious fix, to get rid of the test 
> failure.

Thanks.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails
  2016-05-24 15:09       ` Ken Brown
  2016-05-24 15:27         ` Eli Zaretskii
@ 2019-10-23 10:32         ` Lars Ingebrigtsen
  2019-10-23 16:31           ` bug#23508: " Ken Brown
  1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-23 10:32 UTC (permalink / raw)
  To: Ken Brown; +Cc: 23540, 23508

Ken Brown <kbrown@cornell.edu> writes:

>> Presumably the documentation of open-network-stream should also be
>> updated to reflect this.  I hesitate to do this myself without knowing
>> for sure that t is an acceptable value for all calls to
>> open-network-stream.  I'd rather leave it for someone more familiar with
>> the code, like Lars.
>
> I went ahead and installed the obvious fix, to get rid of the test
> failure.  I'm leaving the bug open because someone knowledgeable still 
> needs to update the documentation of open-network-stream.

The test calls make-network-process, not open-network-stream, so
altering the documentation of the latter doesn't seem appropriate.

As for make-network-process, it's already documented there:

:service SERVICE -- SERVICE is name of the service desired, or an
integer specifying a port number to connect to.  If SERVICE is t,
a random port number is selected for the server.  A port number can
be specified as an integer string, e.g., "80", as well as an integer.

So unless I'm misreading this bug report (which is possible, it's a bit
involved) there's nothing more to do here, and I'm closing this bug
report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23508: bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails
  2019-10-23 10:32         ` Lars Ingebrigtsen
@ 2019-10-23 16:31           ` Ken Brown
  2019-10-24 11:48             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Brown @ 2019-10-23 16:31 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 23540@debbugs.gnu.org, 23508@debbugs.gnu.org

On 10/23/2019 6:32 AM, Lars Ingebrigtsen wrote:
> Ken Brown <kbrown@cornell.edu> writes:
> 
>>> Presumably the documentation of open-network-stream should also be
>>> updated to reflect this.  I hesitate to do this myself without knowing
>>> for sure that t is an acceptable value for all calls to
>>> open-network-stream.  I'd rather leave it for someone more familiar with
>>> the code, like Lars.
>>
>> I went ahead and installed the obvious fix, to get rid of the test
>> failure.  I'm leaving the bug open because someone knowledgeable still
>> needs to update the documentation of open-network-stream.
> 
> The test calls make-network-process, not open-network-stream, so
> altering the documentation of the latter doesn't seem appropriate.

It's appropriate because the documentation is wrong.  The documentation of 
open-network-stream doesn't say that the fourth argument can be t.

Ken





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23508: bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails
  2019-10-23 16:31           ` bug#23508: " Ken Brown
@ 2019-10-24 11:48             ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-24 11:48 UTC (permalink / raw)
  To: Ken Brown; +Cc: 23540@debbugs.gnu.org, 23508@debbugs.gnu.org

Ken Brown <kbrown@cornell.edu> writes:

>>>> Presumably the documentation of open-network-stream should also be
>>>> updated to reflect this.  I hesitate to do this myself without knowing
>>>> for sure that t is an acceptable value for all calls to
>>>> open-network-stream.  I'd rather leave it for someone more familiar with
>>>> the code, like Lars.
>>>
>>> I went ahead and installed the obvious fix, to get rid of the test
>>> failure.  I'm leaving the bug open because someone knowledgeable still
>>> needs to update the documentation of open-network-stream.
>> 
>> The test calls make-network-process, not open-network-stream, so
>> altering the documentation of the latter doesn't seem appropriate.
>
> It's appropriate because the documentation is wrong.  The documentation of 
> open-network-stream doesn't say that the fourth argument can be t.

open-network-stream is for opening a client connection.  The t value for
service only makes sense for servers, so mentioning that value in
the open-network-stream doc string seems odd.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-10-24 11:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-15  1:36 bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails Ken Brown
2016-05-15 12:16 ` Ken Brown
2016-05-15 16:15   ` Eli Zaretskii
2016-05-15 17:08     ` Ken Brown
2016-05-24 15:09       ` Ken Brown
2016-05-24 15:27         ` Eli Zaretskii
2019-10-23 10:32         ` Lars Ingebrigtsen
2019-10-23 16:31           ` bug#23508: " Ken Brown
2019-10-24 11:48             ` Lars Ingebrigtsen

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