diff options
Diffstat (limited to 'ACE/performance-tests/TCP/tcp_test.cpp')
-rw-r--r-- | ACE/performance-tests/TCP/tcp_test.cpp | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/ACE/performance-tests/TCP/tcp_test.cpp b/ACE/performance-tests/TCP/tcp_test.cpp index e2b202326d7..987846227dc 100644 --- a/ACE/performance-tests/TCP/tcp_test.cpp +++ b/ACE/performance-tests/TCP/tcp_test.cpp @@ -541,12 +541,10 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) "server (%P|%t): sched_params failed\n")); } - //FUZZ: disable check_for_lack_ACE_OS - ACE_Get_Opt getopt (argc, argv, ACE_TEXT("hxwvb:I:p:sci:m:at:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("hxwvb:I:p:sci:m:at:")); - while ((c = getopt ()) != -1) + while ((c = get_opt ()) != -1) { - //FUZZ: enable check_for_lack_ACE_OS switch ((char) c) { case 'v': @@ -558,7 +556,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) break; case 'm': - bufsz = ACE_OS::atoi (getopt.opt_arg ()); + bufsz = ACE_OS::atoi (get_opt.opt_arg ()); if (bufsz <= 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -571,7 +569,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) 1); case 'i': - nsamples = ACE_OS::atoi (getopt.opt_arg ()); + nsamples = ACE_OS::atoi (get_opt.opt_arg ()); if (nsamples <= 0) ACE_ERROR_RETURN ((LM_ERROR, "\nIterations must be greater than 0!\n\n"), @@ -595,7 +593,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) #endif /* ACE_WIN32 */ case 'b': - so_bufsz = ACE_OS::atoi (getopt.opt_arg ()); + so_bufsz = ACE_OS::atoi (get_opt.opt_arg ()); if (so_bufsz <= 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -604,7 +602,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) break; case 'I': - usdelay = ACE_OS::atoi (getopt.opt_arg ()); + usdelay = ACE_OS::atoi (get_opt.opt_arg ()); if (usdelay < 0) { @@ -612,20 +610,20 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_ERROR_RETURN ((LM_ERROR, "%s: bad usdelay: %s\n", argv[0], - getopt.opt_arg ()), + get_opt.opt_arg ()), 1); } break; case 'p': - dstport = ACE_OS::atoi (getopt.opt_arg ()); + dstport = ACE_OS::atoi (get_opt.opt_arg ()); if (dstport <= 0) ACE_ERROR_RETURN ((LM_ERROR, "\nInvalid port number!\n\n"), 1); break; case 't': - svr_thrno = ACE_OS::atoi (getopt.opt_arg ()); + svr_thrno = ACE_OS::atoi (get_opt.opt_arg ()); if (svr_thrno <= 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -647,7 +645,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) } } - if ((getopt.opt_ind () >= argc && client != 0) || argc == 1) + if ((get_opt.opt_ind () >= argc && client != 0) || argc == 1) { usage (); return 1; @@ -670,25 +668,25 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_INET_Addr remote_addr; - if (ACE_OS::ace_isdigit(argv[getopt.opt_ind ()][0])) + if (ACE_OS::ace_isdigit(argv[get_opt.opt_ind ()][0])) { if (remote_addr.set (dstport, (ACE_UINT32) ACE_OS::inet_addr - (ACE_TEXT_ALWAYS_CHAR(argv[getopt.opt_ind ()]))) == -1) + (ACE_TEXT_ALWAYS_CHAR(argv[get_opt.opt_ind ()]))) == -1) ACE_ERROR_RETURN ((LM_ERROR, "invalid IP address: %s\n", - argv[getopt.opt_ind ()]), + argv[get_opt.opt_ind ()]), 1); } else { - if (remote_addr.set (dstport, argv[getopt.opt_ind ()]) == -1) + if (remote_addr.set (dstport, argv[get_opt.opt_ind ()]) == -1) ACE_ERROR_RETURN ((LM_ERROR, "invalid IP address: %s\n", - argv[getopt.opt_ind ()]), + argv[get_opt.opt_ind ()]), 1); } - getopt.opt_ind ()++; + get_opt.opt_ind ()++; ACE_DEBUG ((LM_DEBUG, "Connecting to %s:%d\n", remote_addr.get_host_name (), |