Fixed isdnrate -X50
This commit is contained in:
parent
b647754889
commit
a1bc72a63a
|
@ -1,6 +1,6 @@
|
|||
/* #define DEBUG_REDIRZ */
|
||||
|
||||
/* $Id: rate.c,v 1.82 2000/11/19 14:33:05 leo Exp $
|
||||
/* $Id: rate.c,v 1.83 2000/12/07 16:26:12 leo Exp $
|
||||
*
|
||||
* Tarifdatenbank
|
||||
*
|
||||
|
@ -21,6 +21,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: rate.c,v $
|
||||
* Revision 1.83 2000/12/07 16:26:12 leo
|
||||
* Fixed isdnrate -X50
|
||||
*
|
||||
* Revision 1.82 2000/11/19 14:33:05 leo
|
||||
* Work around a SIGSEGV with R:Tags - V4.44
|
||||
*
|
||||
|
@ -2386,7 +2389,16 @@ static int get_area(int *prefix, RATE *Rate, char *number,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* This is a hack to let getZoneRate work again */
|
||||
|
||||
static int _getRate(RATE *Rate, char **msg, int clear);
|
||||
|
||||
int getRate(RATE *Rate, char **msg)
|
||||
{
|
||||
return _getRate(Rate, msg, 1);
|
||||
}
|
||||
|
||||
static int _getRate(RATE *Rate, char **msg, int clear)
|
||||
{
|
||||
static char message[LENGTH];
|
||||
bitfield hourBits;
|
||||
|
@ -2444,7 +2456,7 @@ int getRate(RATE *Rate, char **msg)
|
|||
SIGSEGVs
|
||||
*/
|
||||
|
||||
if (prefix != oprefix) {
|
||||
if (clear && prefix != oprefix) {
|
||||
oprefix = prefix;
|
||||
Rate->_area = Rate->_zone = UNKNOWN;
|
||||
}
|
||||
|
@ -2718,7 +2730,7 @@ int getZoneRate(RATE* Rate, int domestic, int first)
|
|||
Rate->_area=a;
|
||||
Rate->_zone=(*zp);
|
||||
Rate->prefix=prefix;
|
||||
if (getRate(Rate, 0) == UNKNOWN) {
|
||||
if (_getRate(Rate, 0, 0) == UNKNOWN) {
|
||||
Rate->prefix=oprefix;
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
@ -2738,7 +2750,7 @@ int getZoneRate(RATE* Rate, int domestic, int first)
|
|||
area=Provider[prefix].Area[i].Code;
|
||||
res=getDest(area, &Num);
|
||||
if(res!=UNKNOWN)
|
||||
area=Num.scountry;
|
||||
area=*Num.sarea?Num.sarea:Num.scountry;
|
||||
if (res!=UNKNOWN && zone==*zp && area && *area) {
|
||||
countries = realloc(countries,strlen(countries)+strlen(area)+2);
|
||||
if(*countries)
|
||||
|
|
Loading…
Reference in New Issue