Skip to content

Commit

Permalink
Remove any debuggind related print statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpatki committed Aug 2, 2024
1 parent 5a95664 commit 06ee911
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/services/variorum/Variorum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,24 @@ std::tuple<bool, uint64_t> measure(const std::string& name)
return std::make_tuple(false, val);
}

//Extract and print values from JSON object
//Extract the values from JSON object
energy_obj = json_loads(s, JSON_DECODE_ANY, NULL);
void *iter = json_object_iter(energy_obj);
while (iter)
{
node_obj = json_object_iter_value(iter);
if (node_obj == NULL)
{
printf("JSON object not found");
exit(0);
}
node_obj = json_object_iter_value(iter);
if (node_obj == NULL)
{
printf("JSON object not found.");
exit(0);
}

/* The following should return NULL after the first call per our object. */
iter = json_object_iter_next(energy_obj, iter);
}

}

energy_joules = json_integer_value(json_object_get(node_obj, name.c_str()));

//Deallocate the string
free(s);
Expand Down

0 comments on commit 06ee911

Please sign in to comment.