Changeset 2596

Show
Ignore:
Timestamp:
08/25/07 18:56:12 (1 year ago)
Author:
dhozac
Message:

Fallback to context if ncontext/tag don't exist.
Fix remanining vc_getVserverCtx caller.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/getvserverbyctx-compat.hc

    r2589 r2596  
    4949    if (l<=4 || strcmp(name+l-4, ".ctx")!=0) continue; 
    5050    name[l-4]   = '\0'; 
    51     cur_xid = vc_getVserverCtx(name, vcCFG_LEGACY, false, 0); 
     51    cur_xid = vc_getVserverCtx(name, vcCFG_LEGACY, false, 0, vcCTX_XID); 
    5252    if (cur_xid!=xid) continue; 
    5353 
  • trunk/lib/getvserverctx.c

    r2589 r2596  
    176176           
    177177        free(cur_name); 
     178 
     179        if (is_running)                 // fill 'is_running' information... 
     180          *is_running = res!=VC_NOCTX; 
    178181      } 
    179        
    180       if (is_running)                   // fill 'is_running' information... 
    181         *is_running = res!=VC_NOCTX; 
    182        
     182      else if (is_running) 
     183        *is_running = false; 
     184 
    183185      if (res==VC_NOCTX && honor_static) { 
     186check_static: 
    184187        switch (type) { 
    185188          case vcCTX_XID: 
     
    195198 
    196199        res = getCtxFromFile(buf); 
     200        if (res==VC_NOCTX && type!=vcCTX_XID) { 
     201          type = vcCTX_XID; 
     202          goto check_static; 
     203        } 
    197204      } 
    198205