Check-in [942e844672]
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 on 2016-12-13 03:40:24
Other Links: branch diff | manifest | tags
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

Modified tlsIO.c from [f15c16a7e8] to [b6a83cdb8f].

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
	*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);
	}

	/*







<
<














>
|







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
	*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);
	}

	/*
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
			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 --
 *







|







264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
			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 --
 *