View | Details | Raw Unified | Return to bug 32524
Collapse All | Expand All

(-)ab.c-orig (-1 / +14 lines)
Lines 262-267 Link Here
262
int proxyport = 0;		/* proxy port */
262
int proxyport = 0;		/* proxy port */
263
char *connecthost;
263
char *connecthost;
264
apr_port_t connectport;
264
apr_port_t connectport;
265
char *src_address;
265
char *gnuplot;			/* GNUplot file */
266
char *gnuplot;			/* GNUplot file */
266
char *csvperc;			/* CSV Percentile file */
267
char *csvperc;			/* CSV Percentile file */
267
char url[1024];
268
char url[1024];
Lines 1182-1187 Link Here
1182
static void start_connect(struct connection * c)
1183
static void start_connect(struct connection * c)
1183
{
1184
{
1184
    apr_status_t rv;
1185
    apr_status_t rv;
1186
    apr_sockaddr_t *from;
1185
1187
1186
#ifdef USE_SSL
1188
#ifdef USE_SSL
1187
    if (ssl == 1) {
1189
    if (ssl == 1) {
Lines 1211-1216 Link Here
1211
         != APR_SUCCESS) {
1213
         != APR_SUCCESS) {
1212
        apr_err("socket nonblock", rv);
1214
        apr_err("socket nonblock", rv);
1213
    }
1215
    }
1216
    if (src_address) {
1217
        if ((rv = apr_sockaddr_info_get(&from, src_address, destsa->family,
1218
                0, 0, c->ctx)) != APR_SUCCESS)
1219
                apr_err("src_address get", rv);
1220
        if ((rv = apr_socket_bind(c->aprsock, from)) != APR_SUCCESS)
1221
            apr_err("src_address bind", rv);
1222
    }
1214
    c->start = apr_time_now();
1223
    c->start = apr_time_now();
1215
    if ((rv = apr_connect(c->aprsock, destsa)) != APR_SUCCESS) {
1224
    if ((rv = apr_connect(c->aprsock, destsa)) != APR_SUCCESS) {
1216
	if (APR_STATUS_IS_EINPROGRESS(rv)) {
1225
	if (APR_STATUS_IS_EINPROGRESS(rv)) {
Lines 1814-1819 Link Here
1814
    fprintf(stderr, "    -P attribute    Add Basic Proxy Authentication, the attributes\n");
1823
    fprintf(stderr, "    -P attribute    Add Basic Proxy Authentication, the attributes\n");
1815
    fprintf(stderr, "                    are a colon separated username and password.\n");
1824
    fprintf(stderr, "                    are a colon separated username and password.\n");
1816
    fprintf(stderr, "    -X proxy:port   Proxyserver and port number to use\n");
1825
    fprintf(stderr, "    -X proxy:port   Proxyserver and port number to use\n");
1826
    fprintf(stderr, "    -b src_address  Set the local source address\n");
1817
    fprintf(stderr, "    -V              Print version number and exit\n");
1827
    fprintf(stderr, "    -V              Print version number and exit\n");
1818
    fprintf(stderr, "    -k              Use HTTP KeepAlive feature\n");
1828
    fprintf(stderr, "    -k              Use HTTP KeepAlive feature\n");
1819
    fprintf(stderr, "    -d              Do not show percentiles served table.\n");
1829
    fprintf(stderr, "    -d              Do not show percentiles served table.\n");
Lines 1987-1993 Link Here
1987
#endif
1997
#endif
1988
1998
1989
    apr_getopt_init(&opt, cntxt, argc, argv);
1999
    apr_getopt_init(&opt, cntxt, argc, argv);
1990
    while ((status = apr_getopt(opt, "n:c:t:T:p:v:kVhwix:y:z:C:H:P:A:g:X:de:Sq"
2000
    while ((status = apr_getopt(opt, "b:n:c:t:T:p:v:kVhwix:y:z:C:H:P:A:g:X:de:Sq"
1991
#ifdef USE_SSL
2001
#ifdef USE_SSL
1992
				"s"
2002
				"s"
1993
#endif
2003
#endif
Lines 2009-2014 Link Here
2009
	    break;
2019
	    break;
2010
	case 'k':
2020
	case 'k':
2011
	    keepalive = 1;
2021
	    keepalive = 1;
2022
	    break;
2023
	case 'b':
2024
	    src_address = strdup(optarg);
2012
	    break;
2025
	    break;
2013
	case 'q':
2026
	case 'q':
2014
	    heartbeatres = 0;
2027
	    heartbeatres = 0;

Return to bug 32524