diff --git a/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c b/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c index 9673549f79..e78facf287 100644 --- a/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c +++ b/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c @@ -96,18 +96,27 @@ const static struct { const int id; const char *name; } misdn_event_types[] = { - { PH_DATA_REQ, "PH_DATA_REQ" }, - { PH_DATA_IND, "PH_DATA_IND" }, - { PH_DATA_CNF, "PH_DATA_CNF" }, - { PH_CONTROL_REQ, "PH_CONTROL_REQ" }, - { PH_CONTROL_IND, "PH_CONTROL_IND" }, - { PH_CONTROL_CNF, "PH_CONTROL_CNF" }, - { PH_ACTIVATE_REQ, "PH_ACTIVATE_REQ" }, - { PH_ACTIVATE_IND, "PH_ACTIVATE_IND" }, - { PH_ACTIVATE_CNF, "PH_ACTIVATE_CNF" }, - { PH_DEACTIVATE_REQ, "PH_DEACTIVATE_REQ" }, - { PH_DEACTIVATE_IND, "PH_DEACTIVATE_IND" }, - { PH_DEACTIVATE_CNF, "PH_DEACTIVATE_CNF" }, +#define MISDN_EVENT_TYPE(x) { x, #x } + MISDN_EVENT_TYPE(PH_DATA_REQ), + MISDN_EVENT_TYPE(PH_DATA_IND), + MISDN_EVENT_TYPE(PH_DATA_CNF), + MISDN_EVENT_TYPE(PH_DATA_E_IND), + MISDN_EVENT_TYPE(PH_CONTROL_REQ), + MISDN_EVENT_TYPE(PH_CONTROL_IND), + MISDN_EVENT_TYPE(PH_CONTROL_CNF), + MISDN_EVENT_TYPE(PH_ACTIVATE_REQ), + MISDN_EVENT_TYPE(PH_ACTIVATE_IND), + MISDN_EVENT_TYPE(PH_ACTIVATE_CNF), + MISDN_EVENT_TYPE(PH_DEACTIVATE_REQ), + MISDN_EVENT_TYPE(PH_DEACTIVATE_IND), + MISDN_EVENT_TYPE(PH_DEACTIVATE_CNF), + MISDN_EVENT_TYPE(MPH_ACTIVATE_REQ), + MISDN_EVENT_TYPE(MPH_ACTIVATE_IND), + MISDN_EVENT_TYPE(MPH_DEACTIVATE_REQ), + MISDN_EVENT_TYPE(MPH_DEACTIVATE_IND), + MISDN_EVENT_TYPE(MPH_INFORMATION_REQ), + MISDN_EVENT_TYPE(MPH_INFORMATION_IND), +#undef MISDN_EVENT_TYPE }; static const char *misdn_event2str(const int event)