diff options
Diffstat (limited to 'apps/JAWS/clients/WebSTONE')
-rw-r--r-- | apps/JAWS/clients/WebSTONE/src/rexec.c | 4 | ||||
-rw-r--r-- | apps/JAWS/clients/WebSTONE/src/webclient.c | 23 | ||||
-rw-r--r-- | apps/JAWS/clients/WebSTONE/src/webmaster.c | 5 |
3 files changed, 22 insertions, 10 deletions
diff --git a/apps/JAWS/clients/WebSTONE/src/rexec.c b/apps/JAWS/clients/WebSTONE/src/rexec.c index 13addde2498..d9233bbcb34 100644 --- a/apps/JAWS/clients/WebSTONE/src/rexec.c +++ b/apps/JAWS/clients/WebSTONE/src/rexec.c @@ -56,8 +56,8 @@ static char copyright[] = #define STDERROR hStdErr #define FILECOOKIE HANDLE -static void PassOutputThread(); -static void PassErrorThread(); +static void PassOutputThread(SOCKET); +static void PassErrorThread(SOCKET); HANDLE hStdIn, hStdOut, hStdErr; diff --git a/apps/JAWS/clients/WebSTONE/src/webclient.c b/apps/JAWS/clients/WebSTONE/src/webclient.c index 881c9db0ae8..28d206bd5c6 100644 --- a/apps/JAWS/clients/WebSTONE/src/webclient.c +++ b/apps/JAWS/clients/WebSTONE/src/webclient.c @@ -9,8 +9,6 @@ * * **************************************************************************/ -#include <thread.h> - #include <stdio.h> #ifdef WIN32 @@ -27,6 +25,7 @@ #include <string.h> #ifndef WIN32 +#include <thread.h> #include <netdb.h> #include <unistd.h> #endif /* WIN32 */ @@ -412,7 +411,7 @@ accumstats(rqst_timer_t *rqsttimer, page_stats_t *pagestats, stats_t *timestat) * returns the number of files retrieved */ static int -makeload(int maxcount, int pageval, THREAD rqst_timer_t *timerarray, THREAD stats_t *timestat, THREAD SOCKET mastersock, THREAD page_stats_t *page_stats) +makeload(int maxcount, int pageval, rqst_timer_t *timerarray, stats_t *timestat, SOCKET mastersock, page_stats_t *page_stats) { int cnt; int returnval; @@ -927,15 +926,15 @@ main(int argc, char *argv[]) void ClientThread(void *dummy) { - THREAD FILE *logfile; + FILE *logfile; - THREAD stats_t timestat; + stats_t timestat; - THREAD rqst_timer_t timerarray[MAXNUMOFFILES]; - THREAD SOCKET mastersock = BADSOCKET_VALUE; /* connection to webmaster */ + rqst_timer_t timerarray[MAXNUMOFFILES]; + SOCKET mastersock = BADSOCKET_VALUE; /* connection to webmaster */ - THREAD page_stats_t *page_stats; /* actually a dynamic array */ + page_stats_t *page_stats; /* actually a dynamic array */ int loopcnt = 0; int filecnt; @@ -986,7 +985,11 @@ void ClientThread(void *dummy) /* Initialize random number generator */ junk = getpid (); +#ifndef WIN32 rand_r(&junk); +#else + junk = rand (); +#endif /* ! WIN32 */ D_PRINTF( "Random seed: %d\n", junk ); for (i=0; i < MAXNUMOFFILES; i++) @@ -1071,7 +1074,11 @@ void ClientThread(void *dummy) D_PRINTF( "Running in timed mode\n" ); /* random number between 0 and totalweight-1 */ junk = getpid (); +#ifndef WIN32 ran_number = (rand_r(&junk) % total_weight); +#else + ran_number = (RANDOM() % total_weight); +#endif D_PRINTF( "random %ld\n", ran_number ); /* loop through pages, find correct one diff --git a/apps/JAWS/clients/WebSTONE/src/webmaster.c b/apps/JAWS/clients/WebSTONE/src/webmaster.c index 490c354dece..4fef2388f51 100644 --- a/apps/JAWS/clients/WebSTONE/src/webmaster.c +++ b/apps/JAWS/clients/WebSTONE/src/webmaster.c @@ -79,6 +79,8 @@ THREAD FILE *debugfile = stderr; struct hostent *master_phe; /* IP addresses for webmaster */ struct timeval sumedh_start, sumedh_end; +void HostEntCpy(struct hostent *dest, struct hostent *src); + static void usage(const char *progname) { @@ -548,6 +550,8 @@ char *commandline; strcat(webclient_path, "/webclient"); } else +#else + temp = temp; #endif /* WIN32 */ webclient_path = PROGPATH; @@ -1401,6 +1405,7 @@ main(const int argc, char *argv[]) } /* Added by Rajesh Shah 5/18/96 */ +void HostEntCpy(struct hostent *dest, struct hostent *src) { |