SCCS-vsn: usr.sbin/sendmail/src/udb.c 6.23
#ifndef lint
#ifdef USERDB
#ifndef lint
#ifdef USERDB
-static char sccsid [] = "@(#)udb.c 6.22 (Berkeley) %G% (with USERDB)";
+static char sccsid [] = "@(#)udb.c 6.23 (Berkeley) %G% (with USERDB)";
-static char sccsid [] = "@(#)udb.c 6.22 (Berkeley) %G% (without USERDB)";
+static char sccsid [] = "@(#)udb.c 6.23 (Berkeley) %G% (without USERDB)";
case UDB_DBFETCH:
key.data = keybuf;
key.size = keylen;
case UDB_DBFETCH:
key.data = keybuf;
key.size = keylen;
+ if (tTd(28, 80))
+ printf("udbexpand: trying %s\n", keybuf);
i = (*up->udb_dbp->seq)(up->udb_dbp, &key, &info, R_CURSOR);
if (i > 0 || info.size <= 0)
{
i = (*up->udb_dbp->seq)(up->udb_dbp, &key, &info, R_CURSOR);
if (i > 0 || info.size <= 0)
{
printf("udbexpand: no match on %s\n", keybuf);
continue;
}
printf("udbexpand: no match on %s\n", keybuf);
continue;
}
+ if (tTd(28, 80))
+ printf("udbexpand: match %.*s: %.*s\n",
+ key.size, key.data, info.size, info.data);
naddrs = 0;
a->q_flags &= ~QSELFREF;
naddrs = 0;
a->q_flags &= ~QSELFREF;
/* get the next record */
i = (*up->udb_dbp->seq)(up->udb_dbp, &key, &info, R_NEXT);
}
/* get the next record */
i = (*up->udb_dbp->seq)(up->udb_dbp, &key, &info, R_NEXT);
}
+
+ /* if nothing ever matched, try next database */
+ if (!breakout)
+ continue;
+
if (naddrs > 0 && !bitset(QSELFREF, a->q_flags))
{
if (tTd(28, 5))
if (naddrs > 0 && !bitset(QSELFREF, a->q_flags))
{
if (tTd(28, 5))