This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Redboot skip header read for XModem


This skips the information header read for XModem in xyzModem_stream_open(). 
XModem does not have a file information header and this caused in the 
previous implementation a retransmission for the first data block, it was 
read and ignored in the open function (not acknowledged), and read again in 
xyzModem_stream_read.

Nelu
Index: redboot/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/ChangeLog,v
retrieving revision 1.182
diff -u -3 -p -r1.182 ChangeLog
--- redboot/current/ChangeLog	20 Feb 2004 03:38:17 -0000	1.182
+++ redboot/current/ChangeLog	24 Feb 2004 13:24:56 -0000
@@ -1,3 +1,11 @@
+2004-02-24  Gratian Crisan <nelu@iv.ro>
+
+	* src/xyzModem.c: Do not read an information header for XModem 
+	in xyzModem_stream_open(). XModem does not have a file information
+	header and this caused in the previous implementation a retransmission
+	of the first data block (it was read and ignored in the open function).
+
+
 2004-02-20  Jonathan Larmour  <jifl@eCosCentric.com>
 
 	* doc/redboot.sgml: Document lowering security level for TFTP to
Index: redboot/current/src/xyzModem.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/src/xyzModem.c,v
retrieving revision 1.18
diff -u -3 -p -r1.18 xyzModem.c
--- redboot/current/src/xyzModem.c	19 Feb 2004 10:47:11 -0000	1.18
+++ redboot/current/src/xyzModem.c	24 Feb 2004 13:24:58 -0000
@@ -357,6 +357,12 @@ xyzModem_stream_open(connection_info_t *
     
     CYGACC_COMM_IF_PUTC(*xyz.__chan, (xyz.crc_mode ? 'C' : NAK));
 
+    if (xyz.mode == xyzModem_xmodem) {
+	    // X-modem doesn't have an information header - exit here
+            xyz.next_blk = 1;
+            return 0;
+    }
+
     while (retries-- > 0) {
         stat = xyzModem_get_hdr();
         if (stat == 0) {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]