diff --git a/agent/ingest.c b/agent/ingest.c index c7ac15e..016afdf 100644 --- a/agent/ingest.c +++ b/agent/ingest.c @@ -283,6 +283,13 @@ void *rx_thread(int *running) { } break; + case MSG_TYPE_CTRL_PERIOD_PROD: + { + AMP_DEBUG_ALWAYS("NM Agent :","Received Periodic Production Ctrl Message.\n", NULL); + rx_handle_time_prod(&meta, cursor, size, &bytes); + } + break; + default: { AMP_DEBUG_WARN("rx_thread","Received unknown type: %d.\n", hdr->type); diff --git a/mgr/nm_mgr_netui.c b/mgr/nm_mgr_netui.c index 77c20fe..d58a179 100644 --- a/mgr/nm_mgr_netui.c +++ b/mgr/nm_mgr_netui.c @@ -201,6 +201,7 @@ void netui_construct_ctrl_by_idx(agent_t* agent,cmdFormat* curCmd) void netui_construct_time_rule_by_idx(agent_t* agent,cmdFormat* curCmd) { + mid_t* id = NULL; time_t offset = 0; uint32_t period = 0; uint32_t evals = 0; @@ -224,20 +225,30 @@ void netui_construct_time_rule_by_idx(agent_t* agent,cmdFormat* curCmd) /* Step 1a: "tokenize" the string */ char** args=netui_parse_arguments(curCmd->arguments,&numArgs); - if(numArgs<4) + if(numArgs<5) { AMP_DEBUG_ERR("netui_construct_time_rule_by_idx","Not enough arguments %d",numArgs); return; } - offset=atoi(args[0]); - period=atoi(args[1]); - evals=atoi(args[2]); + oid_t oid_id = oid_construct(OID_TYPE_FULL, NULL, 0, args[0], strlen(args[0])); + printf("Parsed OID: %s\n", oid_pretty_print(oid_id)); - /* Step 1b: Split the MID array */ - unsigned int x = 3; + id = mid_construct(MID_TRL, NULL, NULL, oid_id); + + if (id == NULL) { + AMP_DEBUG_ERR("netui_construct_time_rule_by_idx","Could not create MID",NULL); + return; + } + + //printf("Parsed MID: %s\n", mid_pretty_print(id)); - for(x=3;x