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]

Re: Redboot skip header read for XModem


Same patch but with diff against current CVS (it changed from yesterday).

Nelu

> 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.184
diff -u -3 -p -r1.184 ChangeLog
--- redboot/current/ChangeLog	24 Feb 2004 23:09:13 -0000	1.184
+++ redboot/current/ChangeLog	25 Feb 2004 09:12:08 -0000
@@ -1,3 +1,10 @@
+2004-02-25  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-24  Gary Thomas  <gary@mlbassoc.com>
 
 	* cdl/redboot.cdl: net_io needs to be in libextras to enable network
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	25 Feb 2004 09:12:10 -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]