Weaver now writes the ISDN identifier to the config file. This will help

with supporting the BitSurfr...


git-svn-id: file:///home/apenwarr/alumnit-svn/public/trunk@25 6619c942-59fa-0310-bf43-a07aaa81d9ac
This commit is contained in:
dcoombs 1998-10-25 22:12:12 +00:00
parent 00ceede9fb
commit 885c9c4b5d
4 changed files with 14 additions and 9 deletions

View File

@ -368,13 +368,13 @@ void WvDialer::load_options( WvConf& cfg, WvStringList& sect_list )
{ "Force Address", &options.force_addr, NULL, "", 0 },
{ "Remote Name", &options.remote, NULL, "*", 0 },
{ "Default Reply", &options.default_reply,NULL, "ppp", 0 },
{ "ISDN", &options.isdn, NULL, "", 0 },
// int/bool options
{ "Baud", NULL, &options.baud, "", DEFAULT_BAUD },
{ "Carrier Check", NULL, &options.carrier_check, "", true },
{ "Stupid Mode", NULL, &options.stupid_mode, "", false },
{ "New PPPD", NULL, &options.new_pppd, "", false },
{ "ISDN", NULL, &options.isdn, "", false },
{ "Auto Reconnect", NULL, &options.auto_reconnect,"", true },
{ NULL, NULL, NULL, "", 0 }
};
@ -451,7 +451,7 @@ bool WvDialer::init_modem()
// If we're using an ISDN modem, allow one second for the SPID
// settings to kick in. It dials so fast anyway that no one will care.
if( options.isdn )
if( options.isdn.str[0] )
sleep( 1 );
// Everything worked fine.

View File

@ -102,10 +102,10 @@ private:
WvString force_addr;
WvString remote;
WvString default_reply;
WvString isdn;
int carrier_check;
int stupid_mode;
int new_pppd;
int isdn;
int auto_reconnect;
} options;

View File

@ -308,13 +308,18 @@ size_t WvModemScan::coagulate(char *buf, size_t size, int msec)
}
bool WvModemScan::is_isdn() const
char *WvModemScan::is_isdn() const
{
if (!identifier.str[0])
return false;
return NULL;
return (identifier == "3C882"); // 3Com Impact IQ
}
if (identifier == "3C882") // 3Com Impact IQ
return identifier.str;
if (identifier == "940") // Motorola BitSurfr
return identifier.str;
return NULL;
}
static int fileselect(const struct dirent *e)

View File

@ -46,8 +46,8 @@ public:
{ return stage == Done; }
bool isok() const;
// is this an isdn modem?
bool is_isdn() const;
// is this an isdn modem? Returns modem identifier if so.
char *is_isdn() const;
// continue the probe where we left off
void execute();