Changeset b2301de


Ignore:
Timestamp:
2009-11-25 14:00:22 (4 years ago)
Author:
Poul-Henning Kamp <phk@…>
Branches:
2.1, tags/varnish-2.1.0, tags/varnish-2.1.1, tags/varnish-2.1.2, tags/varnish-2.1.3, tags/varnish-2.1.4
Children:
44b0d6b
Parents:
27309b
git-author:
Poul-Henning Kamp <phk@…> (2009-11-25 14:00:22)
git-committer:
Poul-Henning Kamp <phk@…> (2009-11-25 14:00:22)
Message:

Define macros with the varnish port

git-svn-id:  http://www.varnish-cache.org/svn/trunk@4371 d4fa192b-c00b-0410-8231-f00ffab90ce4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/varnishtest/vtc_varnish.c

    r181c28 rb2301de  
    315315{ 
    316316        enum cli_status_e u; 
     317        char *resp, *h, *p, *q; 
    317318 
    318319        if (v->cli_fd < 0) 
     
    329330                return; 
    330331        assert(u == CLIS_OK); 
     332        u = varnish_ask_cli(v, "debug.listen_address", &resp); 
     333        if (vtc_error) 
     334                return; 
     335        assert(u == CLIS_OK); 
     336        h = resp; 
     337        p = strchr(h, ' '); 
     338        AN(p); 
     339        *p++ = '\0'; 
     340        q = strchr(p, '\n'); 
     341        AN(q); 
     342        *q = '\0'; 
     343        vtc_log(v->vl, 2, "Listen on %s %s", h, p); 
     344        macro_def(v->vl, v->name, "addr", "%s", h); 
     345        macro_def(v->vl, v->name, "port", "%s", p); 
     346        macro_def(v->vl, v->name, "sock", "%s:%s", h, p); 
    331347} 
    332348 
     
    344360        if (vtc_error) 
    345361                return; 
     362        macro_def(v->vl, v->name, "addr", NULL); 
     363        macro_def(v->vl, v->name, "port", NULL); 
     364        macro_def(v->vl, v->name, "sock", NULL); 
    346365        vtc_log(v->vl, 2, "Stop"); 
    347366        (void)varnish_ask_cli(v, "stop", NULL); 
Note: See TracChangeset for help on using the changeset viewer.