/****************************************************************************** * * * Function: * * * * Purpose: * * * * Parameters: * * * * Return value: * * * * Comments: * * * ******************************************************************************/ int jarun_icon_common(const char *function_name, const zbx_uint64_t inner_job_id) { zabbix_log(LOG_LEVEL_DEBUG, "In %s() inner_job_id: " ZBX_FS_UI64, function_name, inner_job_id); return ja_flow(inner_job_id, JA_FLOW_TYPE_NORMAL); }
/****************************************************************************** * * * Function: * * * * Purpose: * * * * Parameters: * * * * Return value: * * * * Comments: * * * ******************************************************************************/ int jarun_icon_info(const zbx_uint64_t inner_job_id) { DB_RESULT result; DB_ROW row; int status; char str_status[4]; zbx_uint64_t inner_jobnet_id; int info_flag; char *get_job_id, *get_calendar_id; const char *__function_name = "jarun_icon_info"; zabbix_log(LOG_LEVEL_DEBUG, "In %s() inner_job_id: " ZBX_FS_UI64, __function_name, inner_job_id); result = DBselect ("select inner_jobnet_id, info_flag, get_job_id, get_calendar_id" " from ja_run_icon_info_table" " where inner_job_id = " ZBX_FS_UI64, inner_job_id); status = -1; if (NULL != (row = DBfetch(result))) { ZBX_STR2UINT64(inner_jobnet_id, row[0]); info_flag = atoi(row[1]); get_job_id = row[2]; get_calendar_id = row[3]; switch (info_flag) { case 0: status = jarun_icon_info_get_status(inner_jobnet_id, get_job_id, inner_job_id); break; case 3: status = jarun_icon_info_get_calendar(get_calendar_id, inner_job_id); break; default: break; } } else { ja_log("JARUNICONINFO200003", inner_jobnet_id, NULL, inner_job_id, __function_name, inner_job_id); DBfree_result(result); return FAIL; } DBfree_result(result); if (status < 0) return ja_set_runerr(inner_job_id, 2); zbx_snprintf(str_status, sizeof(str_status), "%d", status); ja_set_value_after(inner_job_id, inner_jobnet_id, "LAST_STATUS", str_status); return ja_flow(inner_job_id, JA_FLOW_TYPE_NORMAL, 1); }