octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #65088] UDP packages longer than 1030 bytes ca


From: Ian Stothers
Subject: [Octave-bug-tracker] [bug #65088] UDP packages longer than 1030 bytes cause hang in istrument-control-0.9.1
Date: Thu, 28 Dec 2023 09:53:57 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?65088>

                 Summary: UDP packages longer than 1030 bytes cause hang in
istrument-control-0.9.1
                   Group: GNU Octave
               Submitter: snotters
               Submitted: Thu 28 Dec 2023 02:53:55 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: snotters
        Originator Email: 
             Open/Closed: Open
                 Release: 8.3.0
         Discussion Lock: Any
        Operating System: Microsoft Windows
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 28 Dec 2023 02:53:55 PM UTC By: Ian Stothers <snotters>
Using GnuOctave v 8.2 with instrument-control-0.8.0 udp packets longer than
1030bytes work fine.

Using GnuOctave v 8.3 or 8.4 with instrument-control-0.9.1 udp packets longer
than 1030bytes do not work fine. Packets smaller than 1015 are ok

Sometimes able to ctrl-c out - then next call produces error: udpport_read:
Error while reading: 10040 - , sometimes

Some code was introduced at instrument-control-0.9.0 that might be related to
the bad behaviour?


--- a/src/udp/udp_class.cc
+++ b/src/udp/udp_class.cc
@@ -108,7 +108,7 @@
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_udp, "octave_udp",
"octave_udp");
 
 octave_udp::octave_udp (void)
-: fd(-1), timeout(-1), name(""), fieldnames(9)
+: buffer_len(0), fd(-1), timeout(-1), name(""), fieldnames(9)
 {
   static bool type_registered = false;
 
@@ -232,6 +232,11 @@
       return -1;
     }
 
+  // default size for now
+  input_buffer = new uint8_t[1024];
+  buffer_len = 1024;
+  buffer_pos = 0;
+
   remote_addr.sin_family = AF_INET;
   remote_addr.sin_port = htons(port);
 








    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65088>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]