small fixes

This commit is contained in:
Andreas Kool 1999-08-21 13:00:10 +00:00
parent fd12a2cacd
commit 66319c39b1
2 changed files with 61 additions and 9 deletions

View File

@ -19,6 +19,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.80 1999/08/20 19:28:18 akool
* isdnlog-3.45
* - removed about 1 Mb of (now unused) data files
* - replaced areacodes and "vorwahl.dat" support by zone databases
* - fixed "Sonderrufnummern"
* - rate-de.dat :: V:1.10-Germany [20-Aug-1999 21:23:27]
*
* Revision 1.79 1999/07/25 15:57:21 akool
* isdnlog-3.43
* added "telnum" module
@ -3418,8 +3425,8 @@ void clearchan(int chan, int total)
for (i = 0; i < MAXMSNS; i++) {
strcpy(call[chan].vnum[i], "?");
call[chan].confentry[i] = -1;
call[chan].sondernummer[i] = -1;
call[chan].confentry[i] = UNKNOWN;
call[chan].sondernummer[i] = UNKNOWN;
call[chan].intern[i] = 0;
} /* for */
} /* clearchan */
@ -3615,7 +3622,7 @@ static void prepareRate(int chan, char **msg, char **tip, int viarep)
if (tip)
*(*tip = lcrhint) = '\0';
clearRate (&call[chan].Rate);
clearRate(&call[chan].Rate);
if (call[chan].intern[CALLED]) {
call[chan].Rate.zone = UNZONE;
@ -3641,9 +3648,16 @@ static void prepareRate(int chan, char **msg, char **tip, int viarep)
call[chan].Rate.src[2] = call[chan].rufnummer[CALLING];
} /* else */
call[chan].Rate.dst[0] = call[chan].areacode[CALLED];
call[chan].Rate.dst[1] = call[chan].vorwahl[CALLED];
call[chan].Rate.dst[2] = call[chan].rufnummer[CALLED];
if (call[chan].sondernummer[CALLED] != UNKNOWN) {
call[chan].Rate.dst[0] = "";
call[chan].Rate.dst[1] = call[chan].num[CALLED];
call[chan].Rate.dst[2] = "";
}
else {
call[chan].Rate.dst[0] = call[chan].areacode[CALLED];
call[chan].Rate.dst[1] = call[chan].vorwahl[CALLED];
call[chan].Rate.dst[2] = call[chan].rufnummer[CALLED];
} /* else */
if (getRate(&call[chan].Rate, msg) == UNKNOWN)
return;

View File

@ -24,6 +24,13 @@
*
*
* $Log$
* Revision 1.74 1999/08/20 19:28:37 akool
* isdnlog-3.45
* - removed about 1 Mb of (now unused) data files
* - replaced areacodes and "vorwahl.dat" support by zone databases
* - fixed "Sonderrufnummern"
* - rate-de.dat :: V:1.10-Germany [20-Aug-1999 21:23:27]
*
* Revision 1.73 1999/07/24 08:44:44 akool
* isdnlog-3.42
* rate-de.dat 1.02-Germany [18-Jul-1999 10:44:21]
@ -1889,7 +1896,8 @@ static int print_line(int status, one_call *cur_call, int computed, char *overla
static void bprint(one_call *call)
{
register char *p = call->num[CALLED];
register char *p = call->num[CALLED];
register int mobil = 0;
auto char target[BUFSIZ], s[BUFSIZ];
auto TELNUM number;
@ -1923,8 +1931,38 @@ static void bprint(one_call *call)
print_msg(PRT_NORMAL, "\nREPAIR: %s -> %s\n", call->num[CALLED], s);
} /* if */
normalizeNumber(s, &number, TN_ALL);
print_msg(PRT_NORMAL, "%s\n", formatNumber("%A", &number));
if (!memcmp(s, "+49170", 6))
mobil = 1;
else if (!memcmp(s, "+49171", 6))
mobil = 1;
else if (!memcmp(s, "+49172", 6))
mobil = 2;
else if (!memcmp(s, "+49173", 6))
mobil = 2;
else if (!memcmp(s, "+49177", 6))
mobil = 3;
else if (!memcmp(s, "+49178", 6))
mobil = 3;
else if (!memcmp(s, "+49176", 6))
mobil = 4;
else if (!memcmp(s, "+49179", 6))
mobil = 4;
else if (*s != '+')
mobil = 5;
if (mobil) {
switch (mobil) {
case 1 : print_msg(PRT_NORMAL, "Mobilfunknetz D1\n"); break;
case 2 : print_msg(PRT_NORMAL, "Mobilfunknetz D2\n"); break;
case 3 : print_msg(PRT_NORMAL, "Mobilfunknetz Eplus\n"); break;
case 4 : print_msg(PRT_NORMAL, "Mobilfunknetz E2\n"); break;
case 5 : print_msg(PRT_NORMAL, "Sonderrufnummer\n"); break;
} /* switch */
}
else {
normalizeNumber(s, &number, TN_ALL);
print_msg(PRT_NORMAL, "%s\n", formatNumber("%A", &number));
} /* else */
}
else
print_msg(PRT_NORMAL, "%*s** %s\n", 30, "", qmsg(TYPE_CAUSE, VERSION_EDSS1, call->cause));