*/
static void _cal_server_alarm_get_upcoming_specific_utime(time_t utime, bool get_all, GList **l)
{
+ CAL_FN_CALL();
int ret = 0;
char query[CAL_DB_SQL_MAX_LEN] = {0};
snprintf(query, sizeof(query), "SELECT A.event_id, A.remind_tick_unit, A.remind_tick,"
ad->time = (long long int)sqlite3_column_int64(stmt, 4);
snprintf(ad->datetime, sizeof(ad->datetime), "%s", (const char *)sqlite3_column_text(stmt, 5));
*l = g_list_append(*l, ad);
- DBG("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
+ ERR("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
ad->event_id, ad->unit, ad->tick, ad->type, ad->time, ad->datetime);
ad->alert_utime = ad->time;
if (false == get_all) break;
static void _cal_server_alarm_get_upcoming_specific_localtime(const char *datetime, bool get_all, GList **l)
{
+ CAL_FN_CALL();
int ret = 0;
char query[CAL_DB_SQL_MAX_LEN] = {0};
snprintf(query, sizeof(query), "SELECT A.event_id, A.remind_tick_unit, A.remind_tick,"
ad->time = (long long int)sqlite3_column_int64(stmt, 4);
snprintf(ad->datetime, sizeof(ad->datetime), "%s", (const char *)sqlite3_column_text(stmt, 5));
*l = g_list_append(*l, ad);
- DBG("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
+ ERR("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
ad->event_id, ad->unit, ad->tick, ad->type, ad->time, ad->datetime);
int y = 0, m = 0, d = 0;
static void _cal_server_alarm_get_upcoming_nonspecific_event_utime(time_t utime, bool get_all, GList **l)
{
+ CAL_FN_CALL();
int ret = 0;
/*
* A:alarm
ad->time = (long long int)sqlite3_column_int64(stmt, 4);
snprintf(ad->datetime, sizeof(ad->datetime), "%s", (const char *)sqlite3_column_text(stmt, 5));
*l = g_list_append(*l, ad);
- DBG("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
+ ERR("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
ad->event_id, ad->unit, ad->tick, ad->type, ad->time, ad->datetime);
ad->alert_utime = ad->time - (ad->tick * ad->unit);
static void _cal_server_alarm_get_upcoming_nonspecific_event_localtime(const char *datetime, bool get_all, GList **l)
{
+ CAL_FN_CALL();
int ret = 0;
/*
* A:alarm
ad->time = (long long int)sqlite3_column_int64(stmt, 4);
snprintf(ad->datetime, sizeof(ad->datetime), "%s", (const char *)sqlite3_column_text(stmt, 5));
*l = g_list_append(*l, ad);
- DBG("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
+ ERR("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
ad->event_id, ad->unit, ad->tick, ad->type, ad->time, ad->datetime);
int y = 0, m = 0, d = 0;
static void _cal_server_alarm_get_upcoming_nonspecific_todo_utime(time_t utime, bool get_all, GList **l)
{
+ CAL_FN_CALL();
int ret = 0;
/*
* A:alarm
ad->time = (long long int)sqlite3_column_int64(stmt, 4);
snprintf(ad->datetime, sizeof(ad->datetime), "%s", (const char *)sqlite3_column_text(stmt, 5));
*l = g_list_append(*l, ad);
- DBG("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
+ ERR("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
ad->event_id, ad->unit, ad->tick, ad->type, ad->time, ad->datetime);
ad->alert_utime = ad->time - (ad->tick * ad->unit);
static void _cal_server_alarm_get_upcoming_nonspecific_todo_localtime(const char *datetime, bool get_all, GList **l)
{
+ CAL_FN_CALL();
int ret = 0;
/*
* A:alarm
ad->time = (long long int)sqlite3_column_int64(stmt, 4);
snprintf(ad->datetime, sizeof(ad->datetime), "%s", (const char *)sqlite3_column_text(stmt, 5));
*l = g_list_append(*l, ad);
- DBG("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
+ ERR("found id(%d) unit(%d) tick(%d) type(%d) time(%lld) [%s]",
ad->event_id, ad->unit, ad->tick, ad->type, ad->time, ad->datetime);
int y = 0, m = 0, d = 0;
WARN("datetime is truncated (%s)",datetime);
}
- DBG("get alert to register with given time (%ld) datetime[%s]", utime, datetime);
+ ERR("get alert to register with given time (%ld) datetime[%s]", utime, datetime); //Temporarily changed to ERR
GList *l = NULL;
}
time_t mod_time = (time_t)ad->alert_utime;
+ /*Temporarily added error logs to handle a defect*/
+ ERR("_cal_server_alarm_register ad->alert_utime (%lld) mod_time (%ld)", ad->alert_utime, mod_time);
alarm_entry_t *alarm_info = NULL;
alarm_info = alarmmgr_create_alarm();
if (NULL == alarm_info) {
default:
tzset();
+ ERR("This case have been choosen "); //Temporarily logs
localtime_r(&mod_time, &st_alarm);
break;
}
date.min = st_alarm.tm_min;
date.sec = st_alarm.tm_sec;
alarmmgr_set_time(alarm_info, date);
- DBG(COLOR_CYAN" >>> registered record id (%d) at %04d/%02d/%02d %02d:%02d:%02d "COLOR_END" (utime(%lld), datetime[%s], tick(%d) unit(%d))",
+ /*Temporarily added error logs to handle a defect*/
+ ERR(COLOR_CYAN" >>> registered record id (%d) at %04d/%02d/%02d %02d:%02d:%02d "COLOR_END" (utime(%lld), datetime[%s], tick(%d) unit(%d))",
ad->event_id, date.year, date.month, date.day, date.hour, date.min, date.sec,
ad->time, ad->datetime, ad->tick, ad->unit);
{
CAL_FN_CALL();
+ ERR(" cal_server_alarm_register_next_alarm utime = %ld", utime); // Temporarily logs
GList *l = NULL;
_cal_server_alarm_get_latest(utime, false, &l);
if (NULL == l)