if (destination != NULL) {
memset(dst_service_name, 0,
- strlen(destination) + strlen(".ALARM") + 2);
- snprintf(dst_service_name, MAX_SERVICE_NAME_LEN, "%s",
+ strlen(destination) + strlen("ALARM.") + 2);
+ snprintf(dst_service_name, MAX_SERVICE_NAME_LEN, "ALARM.%s",
destination);
memset(dst_service_name_mod,'a',MAX_SERVICE_NAME_LEN-1);
j++;
}
- strncat(dst_service_name, ".ALARM", strlen(".ALARM"));
- strncat(dst_service_name_mod, ".ALARM", strlen(".ALARM"));
-
if (!_send_alarm_create
(alarm_context, alarm_info, alarm_id, dst_service_name, dst_service_name_mod,
&error_code)) {
if (destination != NULL) {
memset(dst_service_name, 0,
- strlen(destination) + strlen(".ALARM") + 2);
- snprintf(dst_service_name, MAX_SERVICE_NAME_LEN, "%s",
+ strlen(destination) + strlen("ALARM.") + 2);
+ snprintf(dst_service_name, MAX_SERVICE_NAME_LEN, "ALARM.%s",
destination);
memset(dst_service_name_mod,'a',MAX_SERVICE_NAME_LEN-1);
j++;
}
- strncat(dst_service_name, ".ALARM", strlen(".ALARM"));
- strncat(dst_service_name_mod, ".ALARM", strlen(".ALARM"));
-
if (!_send_alarm_create
(alarm_context, &alarm_info, alarm_id, dst_service_name,dst_service_name_mod,
&error_code)) {
if (ret < 0)
return ret;
- ALARM_MGR_LOG_PRINT("[alarm-lib]:alarm_delete() is called\n");
+ ALARM_MGR_LOG_PRINT("[alarm-lib]:alarm_delete(%d) is called\n", alarm_id);
if (alarm_id <= 0) {
return ERR_ALARM_INVALID_ID;
if (destination != NULL) {
memset(dst_service_name, 0,
- strlen(destination) + strlen(".ALARM") + 2);
- snprintf(dst_service_name, MAX_SERVICE_NAME_LEN, "%s.ALARM",
+ strlen(destination) + strlen("ALARM.") + 2);
+ snprintf(dst_service_name, MAX_SERVICE_NAME_LEN, "ALARM.%s",
destination);
if (!_send_alarm_create
(alarm_context, alarm_info, alarm_id, dst_service_name,"null",
if (strncmp
(g_quark_to_string(__alarm_info->quark_dst_service_name),
"null",4) == 0) {
- strncpy(appid,g_quark_to_string(__alarm_info->quark_app_service_name),strlen(g_quark_to_string(__alarm_info->quark_app_service_name))-6);
+ strncpy(appid,g_quark_to_string(__alarm_info->quark_app_service_name)+6,strlen(g_quark_to_string(__alarm_info->quark_app_service_name))-6);
}
else
{
- strncpy(appid,g_quark_to_string(__alarm_info->quark_dst_service_name),strlen(g_quark_to_string(__alarm_info->quark_dst_service_name))-6);
+ strncpy(appid,g_quark_to_string(__alarm_info->quark_dst_service_name)+6,strlen(g_quark_to_string(__alarm_info->quark_dst_service_name))-6);
}
snprintf(alarm_id_str, 31, "%d", alarm_id);
if (entry->data) {
expire_info = (__expired_alarm_t *) entry->data;
+ ALARM_MGR_LOG_PRINT("service_name(%s), service(%s)", expire_info->service_name, service);
+
if (strcmp(expire_info->service_name, service)
== 0) {
ALARM_MGR_EXCEPTION_PRINT(