summaryrefslogtreecommitdiffabout
path: root/gammu
authorzautrix <zautrix>2004-09-12 09:56:56 (UTC)
committer zautrix <zautrix>2004-09-12 09:56:56 (UTC)
commit31fab1d7e531b492d1075964ddcbebe7a563a41a (patch) (side-by-side diff)
tree91fe6d49f28003106cba1adc9aed816a9019888d /gammu
parent8d822fd4d97fbb38ab2c4f3f3f64f175ef143cff (diff)
downloadkdepimpi-31fab1d7e531b492d1075964ddcbebe7a563a41a.zip
kdepimpi-31fab1d7e531b492d1075964ddcbebe7a563a41a.tar.gz
kdepimpi-31fab1d7e531b492d1075964ddcbebe7a563a41a.tar.bz2
Kammu fixes
Diffstat (limited to 'gammu') (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/gammu/gammu.c47
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
@@ -8246,6 +8246,51 @@ int main(int argc, char *argv[])
if (only_config >= 0) start++; else only_config = -1;
}
+ 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();
for (i = 0; i <= MAX_CONFIG_NUM; i++) {
if (cfg!=NULL) {
@@ -8305,7 +8350,7 @@ int main(int argc, char *argv[])
/* We wanted to read just user specified configuration. */
if (only_config != -1) {break;}
}
-
+#endif
/* Do we have enough parameters? */
if (argc == 1 + start) {
HelpGeneral();