Navigation


Changeset 827:a8ed055a9253 in freeDiameter


Ignore:
Timestamp:
Sep 20, 2012, 3:15:54 PM (12 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Fix name of the constant errors used for rescode

Location:
libfdcore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/p_ce.c

    r740 r827  
    308308                                        TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s'\n",
    309309                                                        hdr->avp_value->os.len, hdr->avp_value->os.data, peer->p_hdr.info.pi_diamid);
    310                                         error->pei_errcode = "ER_DIAMETER_AVP_NOT_ALLOWED";
     310                                        error->pei_errcode = "DIAMETER_AVP_NOT_ALLOWED";
    311311                                        error->pei_message = "Your Origin-Host value does not match my configuration.";
    312312                                        error->pei_avp = avp;
     
    328328                                if (peer->p_hdr.info.runtime.pir_realm) {
    329329                                        TRACE_DEBUG(INFO, "Multiple instances of the Origin-Realm AVP");
    330                                         error->pei_errcode = "ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES";
     330                                        error->pei_errcode = "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES";
    331331                                        error->pei_message = "I found several Origin-Realm AVPs";
    332332                                        error->pei_avp = avp;
     
    336336                                /* If the octet string contains a \0 */
    337337                                if (!fd_os_is_valid_DiameterIdentity(hdr->avp_value->os.data, hdr->avp_value->os.len)) {
    338                                         error->pei_errcode = "ER_DIAMETER_INVALID_AVP_VALUE";
     338                                        error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE";
    339339                                        error->pei_message = "Your Origin-Realm contains invalid characters.";
    340340                                        error->pei_avp = avp;
     
    363363                                                {
    364364                                                        /* in case of error, assume the AVP value was wrong */
    365                                                         error->pei_errcode = "ER_DIAMETER_INVALID_AVP_VALUE";
     365                                                        error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE";
    366366                                                        error->pei_avp = avp;
    367367                                                        return EINVAL;
     
    385385                                if (peer->p_hdr.info.runtime.pir_vendorid) {
    386386                                        TRACE_DEBUG(INFO, "Multiple instances of the Vendor-Id AVP");
    387                                         error->pei_errcode = "ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES";
     387                                        error->pei_errcode = "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES";
    388388                                        error->pei_message = "I found several Vendor-Id AVPs";
    389389                                        error->pei_avp = avp;
     
    406406                                if (peer->p_hdr.info.runtime.pir_prodname) {
    407407                                        TRACE_DEBUG(INFO, "Multiple instances of the Product-Name AVP");
    408                                         error->pei_errcode = "ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES";
     408                                        error->pei_errcode = "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES";
    409409                                        error->pei_message = "I found several Product-Name AVPs";
    410410                                        error->pei_avp = avp;
     
    428428                                if (peer->p_hdr.info.runtime.pir_orstate) {
    429429                                        TRACE_DEBUG(INFO, "Multiple instances of the Origin-State-Id AVP");
    430                                         error->pei_errcode = "ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES";
     430                                        error->pei_errcode = "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES";
    431431                                        error->pei_message = "I found several Origin-State-Id AVPs";
    432432                                        error->pei_avp = avp;
     
    503503                                                TRACE_DEBUG(FULL, "Invalid Vendor-Specific-Application-Id AVP received, ignored");
    504504                                                fd_msg_dump_one(FULL, avp);
    505                                                 error->pei_errcode = "ER_DIAMETER_INVALID_AVP_VALUE";
     505                                                error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE";
    506506                                                error->pei_avp = avp;
    507507                                                return EINVAL;
     
    567567                                }
    568568                                if (hdr->avp_value->u32 >= 32 ) {
    569                                         error->pei_errcode = "ER_DIAMETER_INVALID_AVP_VALUE";
     569                                        error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE";
    570570                                        error->pei_message = "I don't support this Inband-Security-Id value (yet).";
    571571                                        error->pei_avp = avp;
     
    694694               
    695695                /* Set the error code */
    696                 CHECK_FCT( fd_msg_rescode_set(*msg, "ER_DIAMETER_UNABLE_TO_COMPLY", "No CER allowed in current state", NULL, 1 ) );
     696                CHECK_FCT( fd_msg_rescode_set(*msg, "DIAMETER_UNABLE_TO_COMPLY", "No CER allowed in current state", NULL, 1 ) );
    697697
    698698                /* msg now contains an answer message to send back */
  • libfdcore/peers.c

    r767 r827  
    475475                TRACE_DEBUG(INFO, "Received new CER with invalid Origin-Host");
    476476                CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, cer, MSGFL_ANSW_ERROR ) );
    477                 CHECK_FCT( fd_msg_rescode_set(*cer, "ER_DIAMETER_INVALID_AVP_VALUE",
     477                CHECK_FCT( fd_msg_rescode_set(*cer, "DIAMETER_INVALID_AVP_VALUE",
    478478                                                        "Your Origin-Host contains invalid characters.", avp_oh, 1 ) );
    479479                CHECK_FCT( fd_out_send(cer, *cnx, NULL, FD_CNX_ORDERED) );
Note: See TracChangeset for help on using the changeset viewer.