author | zautrix <zautrix> | 2004-09-12 09:56:56 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-12 09:56:56 (UTC) |
commit | 31fab1d7e531b492d1075964ddcbebe7a563a41a (patch) (unidiff) | |
tree | 91fe6d49f28003106cba1adc9aed816a9019888d | |
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 | ||||
-rw-r--r-- | libkcal/phoneformat.cpp | 6 |
2 files changed, 50 insertions, 3 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 | |||
@@ -8247,4 +8247,49 @@ int main(int argc, char *argv[]) | |||
8247 | } | 8247 | } |
8248 | 8248 | ||
8249 | GSM_ReadConfig(NULL, &s.Config[0], 0); | ||
8250 | s.ConfigNum = 1; | ||
8251 | GSM_Config *con = &s.Config[0]; | ||
8252 | |||
8253 | char* tempC; | ||
8254 | tempC = argv[argc-1]+2; | ||
8255 | if ( *tempC != 0 ) { | ||
8256 | fprintf(stderr,"Using model %s \n",tempC); | ||
8257 | strcpy(con->Model,tempC ); | ||
8258 | } | ||
8259 | tempC = argv[argc-2]+2; | ||
8260 | if ( *tempC != 0 ) { | ||
8261 | fprintf(stderr,"Using device %s \n",tempC); | ||
8262 | con->Device = strdup(tempC); | ||
8263 | con->DefaultDevice = false; | ||
8264 | } | ||
8265 | tempC = argv[argc-3]+2; | ||
8266 | if ( *tempC != 0 ) { | ||
8267 | fprintf(stderr,"Using connection %s \n",tempC); | ||
8268 | con->Connection = strdup(tempC); | ||
8269 | con->DefaultConnection = false; | ||
8270 | } | ||
8271 | argc = argc-3; | ||
8272 | #if 0 | ||
8273 | if ( ! mConnection.isEmpty() ) { | ||
8274 | cfg->Connection = strdup(mConnection.latin1()); | ||
8275 | cfg->DefaultConnection = false; | ||
8276 | qDebug("Connection set %s ", cfg->Connection ); | ||
8277 | |||
8278 | } | ||
8279 | if ( ! mDevice.isEmpty() ) { | ||
8280 | cfg->Device = strdup(mDevice.latin1()); | ||
8281 | cfg->DefaultDevice = false; | ||
8282 | qDebug("Device set %s ", cfg->Device); | ||
8283 | |||
8284 | } | ||
8285 | if ( ! mModel.isEmpty() ) { | ||
8286 | strcpy(cfg->Model,mModel.latin1() ); | ||
8287 | cfg->DefaultModel = false; | ||
8288 | qDebug("Model set %s ",cfg->Model ); | ||
8289 | } | ||
8290 | |||
8291 | #endif | ||
8292 | |||
8293 | #if 0 | ||
8249 | cfg=GSM_FindGammuRC(); | 8294 | cfg=GSM_FindGammuRC(); |
8250 | for (i = 0; i <= MAX_CONFIG_NUM; i++) { | 8295 | for (i = 0; i <= MAX_CONFIG_NUM; i++) { |
@@ -8306,5 +8351,5 @@ int main(int argc, char *argv[]) | |||
8306 | if (only_config != -1) {break;} | 8351 | if (only_config != -1) {break;} |
8307 | } | 8352 | } |
8308 | 8353 | #endif | |
8309 | /* Do we have enough parameters? */ | 8354 | /* Do we have enough parameters? */ |
8310 | if (argc == 1 + start) { | 8355 | if (argc == 1 + start) { |
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index 0bc9125..2ad1b5a 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp | |||
@@ -285,5 +285,6 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) | |||
285 | fileName = "/tmp/kdepimtemp.vcs"; | 285 | fileName = "/tmp/kdepimtemp.vcs"; |
286 | #endif | 286 | #endif |
287 | QString command ="./kammu --backup " + fileName + " -yes"; | 287 | QString command ="./kammu --backup " + fileName + " -yes -C" + |
288 | mConnection +" -D" + mDevice +" -M" + mModel; | ||
288 | int ret = system ( command.latin1() ); | 289 | int ret = system ( command.latin1() ); |
289 | if ( ret != 0 ) | 290 | if ( ret != 0 ) |
@@ -489,5 +490,6 @@ bool PhoneFormat::save( Calendar *calendar) | |||
489 | return false; | 490 | return false; |
490 | // 4 call kammu | 491 | // 4 call kammu |
491 | QString command ="./kammu --restore " + fileName ; | 492 | QString command ="./kammu --restore " + fileName + " -C" + |
493 | mConnection +" -D" + mDevice +" -M" + mModel;; | ||
492 | int ret = system ( command.latin1() ); | 494 | int ret = system ( command.latin1() ); |
493 | if ( ret != 0 ) | 495 | if ( ret != 0 ) |