Expect

Check-in [7cdeb14945]
Login

Check-in [7cdeb14945]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix eof bug introduced with previous bug fix - ensure that data received just before an eof is processed. Fix by Sergei Golovan.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7cdeb1494579107b0b769c81e66479099cf55ac5
User & Date: pyssling 2018-02-04 10:09:17.967
Context
2018-02-04
10:17
Fix interact bug - handle reads of 0 length on non-blocking channels by explicitly checking if the channel is non-blocking. Fix by Jack Bates. check-in: f201b879d2 user: pyssling tags: trunk
10:09
Fix eof bug introduced with previous bug fix - ensure that data received just before an eof is processed. Fix by Sergei Golovan. check-in: 7cdeb14945 user: pyssling tags: trunk
2014-05-01
19:22
* exp_main_sub.c: Updated EXP_VERSION to 5.45.3 * configure, configure.in: Updated expect to version 5.45.3 * expect.man [http://sourceforge.net/p/expect/bugs/86/]. Report and fix by Vitezlav Crhonek. * expect.c [http://sourceforge.net/p/expect/bugs/76/]. Report and fix by Mutsuhito Iikura. On finding a full buffer during matching the sliding window mechanism slides too far, truncating the whole buffer and preventing matches across the boundary. Fix is shortening the slide distance (slide only one 1/3). * expect.c: [http://sourceforge.net/p/expect/patches/18/]. Report and fix both by Nils Carlson <[email protected]>. Replaced a cc==0 check with proper Tcl_Eof() check. check-in: efa437fc3b user: andreas_kupries tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to expect.c.
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871

    esPtr = *esPtrOut;

    if (cc == EXP_DATA_NEW) {
	/* try to read it */
	cc = expIRead(interp,esPtr,timeout,tcl_set_flags);
	
	if (Tcl_Eof(esPtr->channel)) {
	    cc = EXP_EOF;
	}
    } else if (cc == EXP_DATA_OLD) {
	cc = 0;
    } else if (cc == EXP_RECONFIGURE) {
	return EXP_RECONFIGURE;
    }







|







1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871

    esPtr = *esPtrOut;

    if (cc == EXP_DATA_NEW) {
	/* try to read it */
	cc = expIRead(interp,esPtr,timeout,tcl_set_flags);
	
	if (cc == 0 && Tcl_Eof(esPtr->channel)) {
	    cc = EXP_EOF;
	}
    } else if (cc == EXP_DATA_OLD) {
	cc = 0;
    } else if (cc == EXP_RECONFIGURE) {
	return EXP_RECONFIGURE;
    }