From 90a0614a7f32eda009cb0175ee20db7ebffb6b88 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 7 Aug 2004 20:38:40 +0000 Subject: [PATCH] Fixed 5d address names when zone is different then our own --- ChangeLog | 2 ++ lib/pktname.c | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7905b6c9..7d456bba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,8 @@ v0.61.3 25-Jul-2004 libmbse.a: Removed the fdn parameter from the attach and un_attach functions, not needed anymore. + Fixed function to return full 5d address in the outbound when + the address is in a different zone then our own zone. libnodelist.a: Fixed IP port override if there is a port added to a protocol. diff --git a/lib/pktname.c b/lib/pktname.c index 05835e41..d48b9d7d 100644 --- a/lib/pktname.c +++ b/lib/pktname.c @@ -30,6 +30,8 @@ #include "../config.h" #include "mbselib.h" +#include "users.h" +#include "mbsedb.h" #ifndef PATH_MAX @@ -70,12 +72,9 @@ char *prepbuf(faddr *addr) */ if (addr && addr->domain && strlen(addr->domain)) { domain = xstrcpy(addr->domain); - } else - for (i = 0; i < 40; i++) - if (CFG.aka[i].zone == addr->zone) { - domain = xstrcpy(CFG.aka[i].domain); - break; - } + } else { + domain = xstrcpy(GetFidoDomain(addr->zone)); + } if ((domain != NULL) && (strlen(CFG.aka[0].domain) != 0) && (strcasecmp(domain,CFG.aka[0].domain) != 0)) { if ((p = strrchr(buf,'/')))