Typo fix LDAP2DNS_TINYDNSDIR check

Add missing check for LDAP2DNS_URI


git-svn-id: https://svn.alkaloid.net/gpl/ldap2dns/trunk@389 06cd67b6-e706-0410-b29e-9de616bca6e9
This commit is contained in:
Ben Klang
2006-12-25 06:37:03 +00:00
parent 9703996908
commit ab63b6ed4f

View File

@@ -139,8 +139,8 @@ static void die_exit(const char* message)
static void set_datadir(void)
{
char* ev = getenv("TINYDNSDIR");
if (ev == NULL)
char* ev = getenv("LDAP2DNS_TINYDNSDIR");
if (!ev)
ev = getenv("LDAP2DNS_TINYDNSDIR");
int len;
tinydns_textfile[0] = '\0';
@@ -324,6 +324,11 @@ static int parse_options()
for (i = 0; i<MAXHOSTS; i++)
options.port[i] = tmp;
}
ev = getenv("LDAP2DNS_URI");
if (ev) {
if (sscanf(ev, "%512[A-Za-z0-9 .:/_+-]", value)==1)
parse_hosts(value);
}
ev = getenv("LDAP2DNS_TIMEOUT");
if (ev && sscanf(ev, "%hd", &options.searchtimeout.tv_sec) != 1)
options.searchtimeout.tv_sec = DEF_SEARCHTIMEOUT;