summaryrefslogtreecommitdiff
path: root/cmd/strsclnt
diff options
context:
space:
mode:
authorMartin Thomson <martin.thomson@gmail.com>2015-08-12 09:44:25 -0700
committerMartin Thomson <martin.thomson@gmail.com>2015-08-12 09:44:25 -0700
commit225703849bf43ff466e4dcfd3b68c30486e8ad12 (patch)
treea6970da1dad182eb7e0d6a346cec7bb89205a789 /cmd/strsclnt
parentdf18e4c7e5e9ad31fab45575896fba7d2bc24250 (diff)
downloadnss-hg-225703849bf43ff466e4dcfd3b68c30486e8ad12.tar.gz
Backed out changeset 4355f55afeb2 (Bug 1158489)
Diffstat (limited to 'cmd/strsclnt')
-rw-r--r--cmd/strsclnt/strsclnt.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd/strsclnt/strsclnt.c b/cmd/strsclnt/strsclnt.c
index f4825050f..43d121e27 100644
--- a/cmd/strsclnt/strsclnt.c
+++ b/cmd/strsclnt/strsclnt.c
@@ -498,6 +498,7 @@ init_thread_data(void)
PRBool useModelSocket = PR_TRUE;
+static const char stopCmd[] = { "GET /stop " };
static const char outHeader[] = {
"HTTP/1.0 200 OK\r\n"
"Server: Netscape-Enterprise/2.0a\r\n"
@@ -566,8 +567,8 @@ do_writes(
{
PRFileDesc * ssl_sock = (PRFileDesc *)a;
lockedVars * lv = (lockedVars *)b;
- unsigned int sent = 0;
- int count = 0;
+ int sent = 0;
+ int count = 0;
while (sent < bigBuf.len) {
@@ -711,7 +712,7 @@ PRInt32 lastFullHandshakePeerID;
void
myHandshakeCallback(PRFileDesc *socket, void *arg)
{
- PR_ATOMIC_SET(&lastFullHandshakePeerID, (PRInt32)((char *)arg - (char *)NULL));
+ PR_ATOMIC_SET(&lastFullHandshakePeerID, (PRInt32) arg);
}
#endif
@@ -731,6 +732,7 @@ do_connects(
PRFileDesc * tcp_sock = 0;
PRStatus prStatus;
PRUint32 sleepInterval = 50; /* milliseconds */
+ SECStatus result;
int rv = SECSuccess;
PRSocketOptionData opt;
@@ -837,8 +839,7 @@ retry:
PR_snprintf(sockPeerIDString, sizeof(sockPeerIDString), "ID%d",
thisPeerID);
SSL_SetSockPeerID(ssl_sock, sockPeerIDString);
- SSL_HandshakeCallback(ssl_sock, myHandshakeCallback,
- (char *)NULL + thisPeerID);
+ SSL_HandshakeCallback(ssl_sock, myHandshakeCallback, (void*)thisPeerID);
#else
/* force a full handshake by setting the no cache option */
SSL_OptionSet(ssl_sock, SSL_NO_CACHE, 1);
@@ -853,9 +854,9 @@ retry:
PR_ATOMIC_INCREMENT(&numConnected);
if (bigBuf.data != NULL) {
- (void)handle_fdx_connection( ssl_sock, tid);
+ result = handle_fdx_connection( ssl_sock, tid);
} else {
- (void)handle_connection( ssl_sock, tid);
+ result = handle_connection( ssl_sock, tid);
}
PR_ATOMIC_DECREMENT(&numConnected);