diff --git a/configure.ac b/configure.ac index 724c5c64..d8e52630 100644 --- a/configure.ac +++ b/configure.ac @@ -117,7 +117,7 @@ AC_ARG_ENABLE(extramodules, AC_MSG_RESULT([$EXTRAMODULES]) AC_SUBST([EXTRAMODULES]) -#CFLAGS="$CFLAGS -g -O0" +CFLAGS="-g -O0" CONFIG_CFLAGS="${CFLAGS}" CONFIG_LDFLAGS="${LDFLAGS}" diff --git a/src/modules/protocol/diameter/parser_diameter.c b/src/modules/protocol/diameter/parser_diameter.c index c50467d1..d896c942 100644 --- a/src/modules/protocol/diameter/parser_diameter.c +++ b/src/modules/protocol/diameter/parser_diameter.c @@ -78,54 +78,55 @@ static int check_command(u_int16_t com_code, const char* com_string) { // check for DIAM_BASE command switch(com_code) { - case CE: { - snprintf(com_string, 3, "%s", com_diam_base_arr[2]); - return DIAM_BASE; - } - case RA: { - snprintf(com_string, 3, "%s", com_diam_base_arr[5]); - return DIAM_BASE; - } - case AC: { - snprintf(com_string, 3, "%s", com_diam_base_arr[0]); - return DIAM_BASE; - } - case AS: { - snprintf(com_string, 3, "%s", com_diam_base_arr[1]); - return DIAM_BASE; - } - case ST: { - snprintf(com_string, 3, "%s", com_diam_base_arr[6]); - return DIAM_BASE; - } - case DW: { - snprintf(com_string, 3, "%s", com_diam_base_arr[3]); - return DIAM_BASE; - } - case DP: { - snprintf(com_string, 3, "%s", com_diam_base_arr[4]); - return DIAM_BASE; + case CE: { + snprintf(com_string, 3, "%s", com_diam_base_arr[2]); + return DIAM_BASE; + } + case RA: { + snprintf(com_string, 3, "%s", com_diam_base_arr[5]); + return DIAM_BASE; + } + case AC: { + snprintf(com_string, 3, "%s", com_diam_base_arr[0]); + return DIAM_BASE; + } + case AS: { + snprintf(com_string, 3, "%s", com_diam_base_arr[1]); + return DIAM_BASE; + } + case ST: { + snprintf(com_string, 3, "%s", com_diam_base_arr[6]); + return DIAM_BASE; + } + case DW: { + snprintf(com_string, 3, "%s", com_diam_base_arr[3]); + return DIAM_BASE; + } + case DP: { + snprintf(com_string, 3, "%s", com_diam_base_arr[4]); + return DIAM_BASE; + } } - // check for 3GPP command - for (i = UA, j = 0; i <= EC; i++, j++) { - if(i == com_code) { - if(i <= MP) - snprintf(com_string, 3, "%s", com_diam_3gpp_arr[j]); - else - snprintf(com_string, 3, "%s", com_diam_3gpp_arr[j-4]); - return _3GPP; - } + // check for 3GPP command + for (i = UA, j = 0; i <= EC; i++, j++) { + if(i == com_code) { + if(i <= MP) + snprintf(com_string, 3, "%s", com_diam_3gpp_arr[j]); + else + snprintf(com_string, 3, "%s", com_diam_3gpp_arr[j-4]); + return _3GPP; } + } - // check for SIP command - for (i = UAS, j = 0; i <= PPS; i++, j++) { - if(i == com_code) { - snprintf(com_string, 3, "%s", com_diam_sip_arr[j]); - return SIP; - } + // check for SIP command + for (i = UAS, j = 0; i <= PPS; i++, j++) { + if(i == com_code) { + snprintf(com_string, 3, "%s", com_diam_sip_arr[j]); + return SIP; } } + return -1; }