-// $Id: getvserverbyctx.c,v 1.6 2004/03/11 04:40:29 ensc Exp $ --*- c -*--
+// $Id: getvserverbyctx.c 2444 2007-01-03 11:55:04Z dhozac $ --*- c -*--
// Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
//
#include "getvserverbyctx-compat.hc"
#include "getvserverbyctx-v13.hc"
+
+char *
+vc_getVserverByCtx_Internal(xid_t ctx, /*@null@*/vcCfgStyle *style,
+ /*@null@*/char const *revdir,
+ bool validate_result)
+{
+ char *ret;
+ if (vc_isSupported(vcFEATURE_MIGRATE)) {
+ ret = vc_getVserverByCtx_v13(ctx, style, revdir, validate_result);
+ if (ret)
+ return ret;
+ }
+ return vc_getVserverByCtx_compat(ctx, style, revdir, validate_result);
+}
+
char *
vc_getVserverByCtx(xid_t ctx, vcCfgStyle *style, char const *revdir)
{
- if (vc_isSupported(vcFEATURE_MIGRATE))
- return vc_getVserverByCtx_v13(ctx, style, revdir);
- else
- return vc_getVserverByCtx_compat(ctx, style, revdir);
+ return vc_getVserverByCtx_Internal(ctx, style, revdir, true);
+
}