set default unit in alarm 34/112634/2
authorJeesun Kim <iamjs.kim@samsung.com>
Thu, 2 Feb 2017 04:46:08 +0000 (13:46 +0900)
committerJeesun Kim <iamjs.kim@samsung.com>
Fri, 3 Feb 2017 00:04:03 +0000 (09:04 +0900)
[PLM-161230-02655] vcalendar parsing is failed with TRIGGER:PT0S
[Cause] PT0S returns tick 0 without assigning unit.
[Solution] Set unit as MINUTE(default)

Change-Id: Ibb9f2214f8afad355c133e70ddf3ccfad003679e

common/cal_vcalendar_parse.c

index 7619225..48b314f 100644 (file)
@@ -2769,7 +2769,7 @@ static void __work_component_property_valarm_trigger(char *value, calendar_recor
                                ret = cal_record_set_int(alarm, _calendar_alarm.tick_unit, CALENDAR_ALARM_TIME_UNIT_SPECIFIC);
                                WARN_IF(CALENDAR_ERROR_NONE != ret, "cal_record_set_int() Fail(%d)", ret);
                        } else {
-                               int unit = 0;
+                               int unit = CALENDAR_ALARM_TIME_UNIT_MINUTE;
                                int tick = 0;
                                __decode_duration(t[i], strlen(t[i]), &tick, &unit);
                                if (CALENDAR_ALARM_TIME_UNIT_SPECIFIC == unit || 0 < tick) {