/* Purge the contents of a node record */ extern void purge_node_rec (struct node_record *node_ptr) { xfree(node_ptr->arch); xfree(node_ptr->comm_name); xfree(node_ptr->features); xfree(node_ptr->gres); if (node_ptr->gres_list) list_destroy(node_ptr->gres_list); xfree(node_ptr->name); xfree(node_ptr->node_hostname); xfree(node_ptr->os); xfree(node_ptr->part_pptr); xfree(node_ptr->reason); acct_gather_energy_destroy(node_ptr->energy); ext_sensors_destroy(node_ptr->ext_sensors); select_g_select_nodeinfo_free(node_ptr->select_nodeinfo); }
extern int ext_sensors_data_unpack(ext_sensors_data_t **ext_sensors, Buf buffer, uint16_t protocol_version) { ext_sensors_data_t *ext_sensors_ptr = ext_sensors_alloc(); *ext_sensors = ext_sensors_ptr; if (ext_sensors_ptr == NULL) return SLURM_ERROR; safe_unpack32(&ext_sensors_ptr->consumed_energy, buffer); safe_unpack32(&ext_sensors_ptr->temperature, buffer); safe_unpack_time(&ext_sensors_ptr->energy_update_time, buffer); safe_unpack32(&ext_sensors_ptr->current_watts, buffer); return SLURM_SUCCESS; unpack_error: ext_sensors_destroy(ext_sensors_ptr); *ext_sensors = NULL; return SLURM_ERROR; }
/* Purge the contents of a node record */ extern void purge_node_rec (struct node_record *node_ptr) { xfree(node_ptr->arch); xfree(node_ptr->comm_name); xfree(node_ptr->cpu_spec_list); xfree(node_ptr->features); xfree(node_ptr->gres); FREE_NULL_LIST(node_ptr->gres_list); xfree(node_ptr->name); xfree(node_ptr->node_hostname); FREE_NULL_BITMAP(node_ptr->node_spec_bitmap); xfree(node_ptr->os); xfree(node_ptr->part_pptr); xfree(node_ptr->power); xfree(node_ptr->reason); xfree(node_ptr->version); acct_gather_energy_destroy(node_ptr->energy); ext_sensors_destroy(node_ptr->ext_sensors); select_g_select_nodeinfo_free(node_ptr->select_nodeinfo); xfree(node_ptr->tres_str); }