author | zautrix <zautrix> | 2004-09-12 09:56:56 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-12 09:56:56 (UTC) |
commit | 31fab1d7e531b492d1075964ddcbebe7a563a41a (patch) (side-by-side diff) | |
tree | 91fe6d49f28003106cba1adc9aed816a9019888d /gammu/emb | |
parent | 8d822fd4d97fbb38ab2c4f3f3f64f175ef143cff (diff) | |
download | kdepimpi-31fab1d7e531b492d1075964ddcbebe7a563a41a.zip kdepimpi-31fab1d7e531b492d1075964ddcbebe7a563a41a.tar.gz kdepimpi-31fab1d7e531b492d1075964ddcbebe7a563a41a.tar.bz2 |
Kammu fixes
-rw-r--r-- | gammu/emb/gammu/gammu.c | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/gammu/emb/gammu/gammu.c b/gammu/emb/gammu/gammu.c index 1d53fb0..5163d81 100644 --- a/gammu/emb/gammu/gammu.c +++ b/gammu/emb/gammu/gammu.c @@ -8248,2 +8248,47 @@ int main(int argc, char *argv[]) + GSM_ReadConfig(NULL, &s.Config[0], 0); + s.ConfigNum = 1; + GSM_Config *con = &s.Config[0]; + + char* tempC; + tempC = argv[argc-1]+2; + if ( *tempC != 0 ) { + fprintf(stderr,"Using model %s \n",tempC); + strcpy(con->Model,tempC ); + } + tempC = argv[argc-2]+2; + if ( *tempC != 0 ) { + fprintf(stderr,"Using device %s \n",tempC); + con->Device = strdup(tempC); + con->DefaultDevice = false; + } + tempC = argv[argc-3]+2; + if ( *tempC != 0 ) { + fprintf(stderr,"Using connection %s \n",tempC); + con->Connection = strdup(tempC); + con->DefaultConnection = false; + } + argc = argc-3; +#if 0 + if ( ! mConnection.isEmpty() ) { + cfg->Connection = strdup(mConnection.latin1()); + cfg->DefaultConnection = false; + qDebug("Connection set %s ", cfg->Connection ); + + } + if ( ! mDevice.isEmpty() ) { + cfg->Device = strdup(mDevice.latin1()); + cfg->DefaultDevice = false; + qDebug("Device set %s ", cfg->Device); + + } + if ( ! mModel.isEmpty() ) { + strcpy(cfg->Model,mModel.latin1() ); + cfg->DefaultModel = false; + qDebug("Model set %s ",cfg->Model ); + } + +#endif + +#if 0 cfg=GSM_FindGammuRC(); @@ -8307,3 +8352,3 @@ int main(int argc, char *argv[]) } - +#endif /* Do we have enough parameters? */ |