summaryrefslogtreecommitdiffabout
path: root/gammu/emb
Side-by-side diff
Diffstat (limited to 'gammu/emb') (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/common/service/gsmcal.c2
-rw-r--r--gammu/emb/gammu/gammu.c41
2 files changed, 35 insertions, 8 deletions
diff --git a/gammu/emb/common/service/gsmcal.c b/gammu/emb/common/service/gsmcal.c
index 598292c..ddf9790 100644
--- a/gammu/emb/common/service/gsmcal.c
+++ b/gammu/emb/common/service/gsmcal.c
@@ -142,7 +142,7 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note
if (note->Entries[Alarm].EntryType == CAL_SILENT_ALARM_DATETIME) {
SaveVCALDateTime(Buffer, Length, &note->Entries[Alarm].Date, "DALARM");
} else {
- SaveVCALDateTime(Buffer, Length, &note->Entries[Alarm].Date, "AALARM");
+ SaveVCALDateTime(Buffer, Length, &note->Entries[Alarm].Date, "DALARM");
}
}
diff --git a/gammu/emb/gammu/gammu.c b/gammu/emb/gammu/gammu.c
index 5163d81..a3b93a8 100644
--- a/gammu/emb/gammu/gammu.c
+++ b/gammu/emb/gammu/gammu.c
@@ -8241,11 +8241,12 @@ int main(int argc, char *argv[])
}
/* Is first parameter numeric? If so treat it as config that should be loaded. */
- if (isdigit(argv[1][0])) {
- only_config = atoi(argv[1]);
- if (only_config >= 0) start++; else only_config = -1;
- }
-
+ //if (isdigit(argv[1][0])) {
+ //only_config = atoi(argv[1]);
+ //if (only_config >= 0) start++; else only_config = -1;
+ //}
+ only_config = 0;;
+#if 0
GSM_ReadConfig(NULL, &s.Config[0], 0);
s.ConfigNum = 1;
GSM_Config *con = &s.Config[0];
@@ -8269,7 +8270,7 @@ int main(int argc, char *argv[])
con->DefaultConnection = false;
}
argc = argc-3;
-#if 0
+ //#if 0
if ( ! mConnection.isEmpty() ) {
cfg->Connection = strdup(mConnection.latin1());
cfg->DefaultConnection = false;
@@ -8290,7 +8291,7 @@ int main(int argc, char *argv[])
#endif
-#if 0
+
cfg=GSM_FindGammuRC();
for (i = 0; i <= MAX_CONFIG_NUM; i++) {
if (cfg!=NULL) {
@@ -8315,6 +8316,7 @@ int main(int argc, char *argv[])
}
/* Wanted user specific configuration? */
+
if (only_config != -1) {
/* Here we get only in first for loop */
if (!GSM_ReadConfig(cfg, &s.Config[0], only_config)) break;
@@ -8350,7 +8352,31 @@ int main(int argc, char *argv[])
/* We wanted to read just user specified configuration. */
if (only_config != -1) {break;}
}
+#if 0
+ 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;
+ }
#endif
+ argc = argc-3;
+
+
/* Do we have enough parameters? */
if (argc == 1 + start) {
HelpGeneral();
@@ -8369,6 +8395,7 @@ int main(int argc, char *argv[])
while (Parameters[z].Function != NULL) {
if (mystrncasecmp(Parameters[z].parameter,argv[1+start], 0)) {
if (argc-2-start >= Parameters[z].min_arg && argc-2-start <= Parameters[z].max_arg) {
+ fprintf(stderr,"Executing \n");
Parameters[z].Function(argc - start, argv + start);
break;
} else {