From 905635d97d86287f428869d676eb25ab6af26ad5 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 2 Feb 2009 16:58:30 +0000 Subject: [PATCH] Clear reservation's partition name if reset to "" --- src/slurmctld/reservation.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c index 4a1f94f1cbf..7d632897824 100644 --- a/src/slurmctld/reservation.c +++ b/src/slurmctld/reservation.c @@ -908,11 +908,17 @@ extern int update_resv(reserve_request_msg_t *resv_desc_ptr) } else resv_ptr->flags = resv_desc_ptr->flags; } + if (resv_desc_ptr->partition && (resv_desc_ptr->partition[0] == '\0')) { + /* Clear the partition */ + xfree(resv_desc_ptr->partition); + xfree(resv_ptr->partition); + resv_ptr->part_ptr = NULL; + } if (resv_desc_ptr->partition) { struct part_record *part_ptr = NULL; part_ptr = find_part_record(resv_desc_ptr->partition); if (!part_ptr) { - info("Reservation request has invalid partition %s", + info("Reservation request has invalid partition (%s)", resv_desc_ptr->partition); error_code = ESLURM_INVALID_PARTITION_NAME; goto fini; -- GitLab