|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T a
Length: 2681 (0xa79)
Types: TextFile
Names: »acsapaddr.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/acsap/acsapaddr.c«
/* acsapaddr.c - application entity information -- lookup */
#ifndef lint
static char *rcsid = "$Header: /f/osi/acsap/RCS/acsapaddr.c,v 7.0 89/11/23 21:21:45 mrose Rel $";
#endif
/*
* $Header: /f/osi/acsap/RCS/acsapaddr.c,v 7.0 89/11/23 21:21:45 mrose Rel $
*
*
* $Log: acsapaddr.c,v $
* Revision 7.0 89/11/23 21:21:45 mrose
* Release 6.0
*
*/
/*
* NOTICE
*
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
* this agreement.
*
*/
/* LINTLIBRARY */
#include <stdio.h>
#include "psap.h"
#include "isoaddrs.h"
#include "tailor.h"
#ifndef NOSTUB
AEI str2aei_stub ();
struct PSAPaddr *aei2addr_stub ();
#endif
AEI str2aei_dse ();
struct PSAPaddr *aei2addr_dse ();
/* \f
DATA */
#ifndef NOSTUB
static char fallback1[BUFSIZ],
fallback2[BUFSIZ];
#endif
static struct PSAPaddr *(*lookup) () = NULL;
/* \f
*/
AEI str2aei (designator, qualifier)
char *designator,
*qualifier;
{
AEI aei;
if (qualifier == NULLCP)
qualifier = "default";
isodetailor (NULLCP, 0);
LLOG (addr_log, LLOG_TRACE,
("str2aei \"%s\" \"%s\"", designator, qualifier));
aei = NULL, lookup = NULL;
if (ns_enabled) {
if (aei = str2aei_dse (designator, qualifier)) {
lookup = aei2addr_dse;
#ifndef NOSTUB
(void) strcpy (fallback1, designator);
(void) strcpy (fallback2, qualifier);
goto out;
#endif
}
else
SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP,
("DSE lookup of service \"%s-%s\" failed",
designator, qualifier));
}
#ifndef NOSTUB
if (aei = str2aei_stub (designator, qualifier))
lookup = aei2addr_stub;
else
SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP,
("stub DSE lookup of service \"%s-%s\" failed",
designator, qualifier));
#endif
#ifndef NOSTUB
out: ;
#endif
SLOG (addr_log, LLOG_TRACE, NULLCP,
("str2aei returns %s", aei ? sprintaei (aei) : "NULLAEI"));
return aei;
}
/* \f
*/
struct PSAPaddr *aei2addr (aei)
AEI aei;
{
struct PSAPaddr *pa;
isodetailor (NULLCP, 0);
SLOG (addr_log, LLOG_TRACE, NULLCP, ("aei2addr %s", sprintaei (aei)));
if (lookup) {
pa = (*lookup) (aei);
#ifndef NOSTUB
if (pa == NULLPA
&& lookup == aei2addr_dse
&& (aei = str2aei_stub (fallback1, fallback2))
&& (pa = aei2addr_stub (aei))) {
SLOG (addr_log, LLOG_NOTICE, NULLCP,
("fallback use of stub DSE succeeded"));
}
#endif
lookup = NULL;
}
else
pa = NULLPA;
SLOG (addr_log, LLOG_TRACE, NULLCP,
("aei2addr returns %s", paddr2str (pa, NULLNA)));
return pa;
}