Check-in [942e844672]

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

Overview
Comment:Fixed uninitialized use of variable
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wip-fix-io-layer
Files: files | file ages | folders
SHA1:942e844672b190498f3432c9f96fc0ba6aa49879
User & Date: rkeene 2016-12-13 03:40:24
Context
2016-12-13
03:46
Made all unused variables self-assignments check-in: 7b169db8a3 user: rkeene tags: wip-fix-io-layer
03:40
Fixed uninitialized use of variable check-in: 942e844672 user: rkeene tags: wip-fix-io-layer
03:35
Cleaned up more things check-in: 4579316443 user: rkeene tags: wip-fix-io-layer
Changes

Changes to tlsIO.c.

204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
...
220
221
222
223
224
225
226

227
228
229
230
231
232
233
234
...
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
	*errorCodePtr = 0;

	dprintf("BIO_read(%d)", bufSize);

	if (statePtr->flags & TLS_TCL_CALLBACK) {
		/* don't process any bytes while verify callback is running */
		dprintf("Callback is running, reading 0 bytes");

		bytesRead = 0;
		return(0);
	}

	dprintf("Calling Tls_WaitForConnect");
	tlsConnect = Tls_WaitForConnect(statePtr, errorCodePtr);
	if (tlsConnect < 0) {
		dprintf("Got an error (bytesRead = %i)", bytesRead);
................................................................................

		if (*errorCodePtr == ECONNRESET) {
			dprintf("Got connection reset");
			/* Soft EOF */
			*errorCodePtr = 0;
			bytesRead = 0;
		}

		return(bytesRead);
	}

	if (statePtr->flags & TLS_TCL_INIT) {
		statePtr->flags &= ~(TLS_TCL_INIT);
	}

	/*
................................................................................
			dprintf("I/O error reading, treating it as EOF");
			*errorCodePtr = 0;
			bytesRead = 0;
			break;
	}

	dprintf("Input(%d) -> %d [%d]", bufSize, bytesRead, *errorCodePtr);
	return bytesRead;
}

/*
 *-------------------------------------------------------------------
 *
 * TlsOutputProc --
 *







<
<







 







>
|







 







|







204
205
206
207
208
209
210


211
212
213
214
215
216
217
...
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
...
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
	*errorCodePtr = 0;

	dprintf("BIO_read(%d)", bufSize);

	if (statePtr->flags & TLS_TCL_CALLBACK) {
		/* don't process any bytes while verify callback is running */
		dprintf("Callback is running, reading 0 bytes");


		return(0);
	}

	dprintf("Calling Tls_WaitForConnect");
	tlsConnect = Tls_WaitForConnect(statePtr, errorCodePtr);
	if (tlsConnect < 0) {
		dprintf("Got an error (bytesRead = %i)", bytesRead);
................................................................................

		if (*errorCodePtr == ECONNRESET) {
			dprintf("Got connection reset");
			/* Soft EOF */
			*errorCodePtr = 0;
			bytesRead = 0;
		}

		return(0);
	}

	if (statePtr->flags & TLS_TCL_INIT) {
		statePtr->flags &= ~(TLS_TCL_INIT);
	}

	/*
................................................................................
			dprintf("I/O error reading, treating it as EOF");
			*errorCodePtr = 0;
			bytesRead = 0;
			break;
	}

	dprintf("Input(%d) -> %d [%d]", bufSize, bytesRead, *errorCodePtr);
	return(bytesRead);
}

/*
 *-------------------------------------------------------------------
 *
 * TlsOutputProc --
 *