From a222c2f7369eeefd19454c973c0cc48300f72bec Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 12 Sep 2004 15:24:11 +0000 Subject: many phone sync fixes --- (limited to 'gammu/emb') diff --git a/gammu/emb/common/service/gsmcal.c b/gammu/emb/common/service/gsmcal.c index ddf9790..0ea8e06 100644 --- a/gammu/emb/common/service/gsmcal.c +++ b/gammu/emb/common/service/gsmcal.c @@ -474,12 +474,12 @@ GSM_Error GSM_DecodeVCALENDAR_VTODO(unsigned char *Buffer, int *Pos, GSM_Calenda } if (ReadVCALText(Line, "PRIORITY", Buff)) { if (ToDoVer == SonyEricsson_VToDo) { - ToDo->Priority = GSM_Priority_Low; + ToDo->Priority = GSM_Priority_Medium; if (atoi(DecodeUnicodeString(Buff))>3) ToDo->Priority = GSM_Priority_Low; if (atoi(DecodeUnicodeString(Buff))<3) ToDo->Priority = GSM_Priority_High; dbgprintf("atoi is %i %s\n",atoi(DecodeUnicodeString(Buff)),DecodeUnicodeString(Buff)); } else if (ToDoVer == Nokia_VToDo) { - ToDo->Priority = GSM_Priority_Low; + ToDo->Priority = GSM_Priority_Medium; if (atoi(DecodeUnicodeString(Buff))>3) ToDo->Priority = GSM_Priority_Low; if (atoi(DecodeUnicodeString(Buff))<3) ToDo->Priority = GSM_Priority_High; } diff --git a/gammu/emb/gammu/gammu.c b/gammu/emb/gammu/gammu.c index a3b93a8..997485a 100644 --- a/gammu/emb/gammu/gammu.c +++ b/gammu/emb/gammu/gammu.c @@ -4627,6 +4627,7 @@ static void Restore(int argc, char *argv[]) } DoRestore = false; if (Backup.Calendar[0] != NULL) { + DoRestore = true; /* N6110 doesn't support getting calendar status */ error = Phone->GetNextCalendar(&s,&Calendar,true); if (error == ERR_NONE || error == ERR_INVALIDLOCATION || error == ERR_EMPTY) { @@ -4678,6 +4679,8 @@ static void Restore(int argc, char *argv[]) if (Backup.ToDo[0] != NULL) { error = Phone->GetToDoStatus(&s,&ToDoStatus); if (error == ERR_NONE) { + error == ERR_NOTSUPPORTED; + DoRestore = true; max = 0; while (Backup.ToDo[max]!=NULL) max++; printmsgerr("%i entries in backup file\n",max); @@ -4686,8 +4689,10 @@ static void Restore(int argc, char *argv[]) } } if (DoRestore) { + if ( max > 0 ) { ToDo = *Backup.ToDo[0]; error = Phone->SetToDo(&s,&ToDo); + } } if (DoRestore && (error == ERR_NOTSUPPORTED || error == ERR_NOTIMPLEMENTED)) { printmsgerr("Deleting old ToDo: "); @@ -8374,7 +8379,6 @@ int main(int argc, char *argv[]) con->DefaultConnection = false; } #endif - argc = argc-3; /* Do we have enough parameters? */ -- cgit v0.9.0.2