diff options
Diffstat (limited to 'performance-tests/UDP/udp_test.cpp')
-rw-r--r-- | performance-tests/UDP/udp_test.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/performance-tests/UDP/udp_test.cpp b/performance-tests/UDP/udp_test.cpp index 45fa0988950..b6295291876 100644 --- a/performance-tests/UDP/udp_test.cpp +++ b/performance-tests/UDP/udp_test.cpp @@ -608,24 +608,24 @@ main (int argc, char *argv[]) switch ((char) c) { case 'x': - max_allow = ACE_OS::atoi (getopt.optarg); + max_allow = ACE_OS::atoi (getopt.opt_arg ()); break; case 'w': - window = ACE_OS::atoi (getopt.optarg); + window = ACE_OS::atoi (getopt.opt_arg ()); if (window < 0) ACE_ERROR_RETURN ((LM_ERROR, "Invalid window!\n\n"), 1); break; case 'f': - ACE_OS::strcpy (datafile, getopt.optarg); + ACE_OS::strcpy (datafile, getopt.opt_arg ()); logfile = 1; break; case 'v': VERBOSE = 1; break; case 'b': - bufsz = ACE_OS::atoi (getopt.optarg); + bufsz = ACE_OS::atoi (getopt.opt_arg ()); if (bufsz <= 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -633,7 +633,7 @@ main (int argc, char *argv[]) 1); case 'n': - nsamples = ACE_OS::atoi (getopt.optarg); + nsamples = ACE_OS::atoi (getopt.opt_arg ()); if (nsamples <= 0) ACE_ERROR_RETURN ((LM_ERROR, "\nIterations must be greater than 0!\n\n"), @@ -643,7 +643,7 @@ main (int argc, char *argv[]) use_reactor = 1; break; case 's': - so_bufsz = ACE_OS::atoi (getopt.optarg); + so_bufsz = ACE_OS::atoi (getopt.opt_arg ()); if (so_bufsz <= 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -651,17 +651,17 @@ main (int argc, char *argv[]) 1); break; case 'I': - usdelay = ACE_OS::atoi (getopt.optarg); + usdelay = ACE_OS::atoi (getopt.opt_arg ()); if (usdelay == 0) ACE_ERROR_RETURN ((LM_ERROR, "%s: bad usdelay: %s\n", argv[0], - getopt.optarg), + getopt.opt_arg ()), 1); break; case 'p': - dstport = ACE_OS::atoi (getopt.optarg); + dstport = ACE_OS::atoi (getopt.opt_arg ()); if (dstport <= 0) ACE_ERROR_RETURN ((LM_ERROR, "\nInvalid port number!\n\n"), @@ -681,7 +681,7 @@ main (int argc, char *argv[]) } } - if (getopt.optind >= argc && client || argc == 1) + if (getopt.opt_ind () >= argc && client || argc == 1) { usage (); return 1; @@ -713,25 +713,25 @@ main (int argc, char *argv[]) 1); ACE_INET_Addr remote_addr; - if (isdigit(argv[getopt.optind][0])) + if (isdigit(argv[getopt.opt_ind ()][0])) { if (remote_addr.set (dstport, (ACE_UINT32) ACE_OS::inet_addr - (argv[getopt.optind])) == -1) + (argv[getopt.opt_ind ()])) == -1) ACE_ERROR_RETURN ((LM_ERROR, "invalid IP address: %s\n", - argv[getopt.optind]), + argv[getopt.opt_ind ()]), 1); } else { - if (remote_addr.set (dstport, argv[getopt.optind]) == -1) + if (remote_addr.set (dstport, argv[getopt.opt_ind ()]) == -1) ACE_ERROR_RETURN ((LM_ERROR, "invalid IP address: %s\n", - argv[getopt.optind]), + argv[getopt.opt_ind ()]), 1); } - getopt.optind++; + getopt.opt_ind ()++; Client client (addr, remote_addr); |