summaryrefslogtreecommitdiff
path: root/pathd/path_pcep_controller.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-01-30 10:08:25 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-01-31 15:15:42 -0500
commitd5dea3506e4bb55ebea5a225c70e24e8d6c800ac (patch)
tree0692150aabb29769357007ac2a095808c52e0952 /pathd/path_pcep_controller.c
parentda21ae9dc78ad3b7681047f5783e83af9a0242b3 (diff)
pathd: Add missing enum's to switch statement
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pathd/path_pcep_controller.c')
-rw-r--r--pathd/path_pcep_controller.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/pathd/path_pcep_controller.c b/pathd/path_pcep_controller.c
index b9f2ba3c63..380d1ab221 100644
--- a/pathd/path_pcep_controller.c
+++ b/pathd/path_pcep_controller.c
@@ -603,7 +603,9 @@ void pcep_thread_timer_handler(struct thread *thread)
pcep_thread_remove_candidate_path_segments(ctrl_state,
pcc_state);
break;
- default:
+ case TM_PCEPLIB_TIMER:
+ case TM_UNDEFINED:
+ case TM_MAX:
flog_warn(EC_PATH_PCEP_RECOVERABLE_INTERNAL_ERROR,
"Unknown controller timer triggered: %u", timer_type);
break;
@@ -823,7 +825,7 @@ void pcep_thread_event_handler(struct thread *thread)
pcep_pcc_send_error(ctrl_state, pcc_state, error,
(bool)sub_type);
break;
- default:
+ case EV_PCEPLIB_EVENT:
flog_warn(EC_PATH_PCEP_RECOVERABLE_INTERNAL_ERROR,
"Unexpected event received in controller thread: %u",
type);
@@ -1074,10 +1076,16 @@ const char *timer_type_name(enum pcep_ctrl_timer_type type)
return "PCEPLIB_TIMER";
case TM_TIMEOUT:
return "TIMEOUT";
- default:
+ case TM_CALCULATE_BEST_PCE:
+ return "BEST_PCE";
+ case TM_SESSION_TIMEOUT_PCC:
+ return "TIMEOUT_PCC";
+ case TM_MAX:
return "UNKNOWN";
}
-};
+
+ assert(!"Reached end of function where we did not expect to");
+}
const char *timeout_type_name(enum pcep_ctrl_timeout_type type)
{
@@ -1086,7 +1094,9 @@ const char *timeout_type_name(enum pcep_ctrl_timeout_type type)
return "UNDEFINED";
case TO_COMPUTATION_REQUEST:
return "COMPUTATION_REQUEST";
- default:
+ case TO_MAX:
return "UNKNOWN";
}
+
+ assert(!"Reached end of function where we did not expect to");
}