Changeset cc27c86 for lib/iow-zlib.c
- Timestamp:
- 01/09/12 14:20:33 (10 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- a0ec6f1
- Parents:
- a566d9c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/iow-zlib.c
r8608a0fa rcc27c86 40 40 #include <stdlib.h> 41 41 #include <string.h> 42 #include <assert.h> 42 43 43 44 /* Libtrace IO module implementing a zlib writer */ … … 142 143 static void zlib_wclose(iow_t *iow) 143 144 { 144 while (deflate(&DATA(iow)->strm, Z_FINISH) == Z_OK) { 145 /* Need to flush the output buffer */ 145 int res; 146 147 while (1) { 148 res = deflate(&DATA(iow)->strm, Z_FINISH); 149 150 if (res == Z_STREAM_END) 151 break; 152 if (res == Z_STREAM_ERROR) { 153 fprintf(stderr, "Z_STREAM_ERROR while closing output\n"); 154 break; 155 } 156 146 157 wandio_wwrite(DATA(iow)->child, 147 158 (char*)DATA(iow)->outbuff, … … 150 161 DATA(iow)->strm.avail_out = sizeof(DATA(iow)->outbuff); 151 162 } 163 152 164 deflateEnd(&DATA(iow)->strm); 153 165 wandio_wwrite(DATA(iow)->child,
Note: See TracChangeset
for help on using the changeset viewer.