Navigation


Changeset 1119:79dd22145f52 in freeDiameter for libfdcore


Ignore:
Timestamp:
May 14, 2013, 12:04:20 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Fix a number of compilation warnings

Location:
libfdcore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/config.c

    r1113 r1119  
    8585        FD_DUMP_HANDLE_OFFSET();
    8686       
    87         CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "freeDiameter configuration:\n", fd_g_config), return NULL);       
     87        CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "freeDiameter configuration:\n"), return NULL);   
    8888        CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "  Default trace level .... : %+d\n", fd_g_debug_lvl), return NULL);
    8989        CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "  Configuration file ..... : %s\n", fd_g_config->cnf_file), return NULL);
  • libfdcore/core.c

    r1112 r1119  
    320320int fd_core_wait_shutdown_complete(void)
    321321{
    322         int ret;
    323322        enum core_state cur_state = core_state_get();
    324323        void * th_ret = NULL;
  • libfdcore/endpoints.c

    r1113 r1119  
    328328                }
    329329        }
    330 }
    331        
     330        return *buf;
     331}
     332       
  • libfdcore/p_ce.c

    r1113 r1119  
    275275                if (hdr->avp_flags & AVP_FLAG_VENDOR) {
    276276                        /* Ignore all vendor-specific AVPs in CER/CEA because we don't support any currently */
    277                         TRACE_DEBUG(FULL, "Ignored a vendor AVP in CER / CEA");
    278                         fd_msg_dump_one(FULL, avp);
     277                        LOG_A("Ignored a vendor-specific AVP in CER / CEA");
    279278                        goto next;
    280279                }
     
    284283                                if (hdr->avp_value == NULL) {
    285284                                        /* This is a sanity check */
    286                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    287                                         fd_msg_dump_one(NONE, avp);
     285                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    288286                                        ASSERT(0); /* To check if this really happens, and understand why... */
    289287                                        goto next;
     
    297295                                if (hdr->avp_value == NULL) {
    298296                                        /* This is a sanity check */
    299                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    300                                         fd_msg_dump_one(NONE, avp);
     297                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    301298                                        ASSERT(0); /* To check if this really happens, and understand why... */
    302299                                        goto next;
     
    319316                                if (hdr->avp_value == NULL) {
    320317                                        /* This is a sanity check */
    321                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    322                                         fd_msg_dump_one(NONE, avp);
     318                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    323319                                        ASSERT(0); /* To check if this really happens, and understand why... */
    324320                                        goto next;
     
    350346                                if (hdr->avp_value == NULL) {
    351347                                        /* This is a sanity check */
    352                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    353                                         fd_msg_dump_one(NONE, avp);
     348                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    354349                                        ASSERT(0); /* To check if this really happens, and understand why... */
    355350                                        goto next;
     
    376371                                if (hdr->avp_value == NULL) {
    377372                                        /* This is a sanity check */
    378                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    379                                         fd_msg_dump_one(NONE, avp);
     373                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    380374                                        ASSERT(0); /* To check if this really happens, and understand why... */
    381375                                        goto next;
     
    397391                                if (hdr->avp_value == NULL) {
    398392                                        /* This is a sanity check */
    399                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    400                                         fd_msg_dump_one(NONE, avp);
     393                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    401394                                        ASSERT(0); /* To check if this really happens, and understand why... */
    402395                                        goto next;
     
    419412                                if (hdr->avp_value == NULL) {
    420413                                        /* This is a sanity check */
    421                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    422                                         fd_msg_dump_one(NONE, avp);
     414                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    423415                                        ASSERT(0); /* To check if this really happens, and understand why... */
    424416                                        goto next;
     
    440432                                if (hdr->avp_value == NULL) {
    441433                                        /* This is a sanity check */
    442                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    443                                         fd_msg_dump_one(NONE, avp);
     434                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    444435                                        ASSERT(0); /* To check if this really happens, and understand why... */
    445436                                        goto next;
     
    468459
    469460                                                if (inhdr->avp_flags & AVP_FLAG_VENDOR) {
    470                                                         TRACE_DEBUG(FULL, "Ignored a vendor AVP inside Vendor-Specific-Application-Id AVP");
    471                                                         fd_msg_dump_one(FULL, avp);
     461                                                        LOG_A("Ignored a vendor AVP inside Vendor-Specific-Application-Id AVP");
    472462                                                        goto innext;
    473463                                                }
     
    475465                                                if (inhdr->avp_value == NULL) {
    476466                                                        /* This is a sanity check */
    477                                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    478                                                         fd_msg_dump_one(NONE, avp);
     467                                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    479468                                                        ASSERT(0); /* To check if this really happens, and understand why... */
    480469                                                        goto innext;
     
    508497                                               
    509498                                                if (invalid) {
    510                                                         TRACE_DEBUG(FULL, "Invalid Vendor-Specific-Application-Id AVP received, ignored");
    511                                                         fd_msg_dump_one(FULL, avp);
     499                                                        TRACE_DEBUG(FULL, "Invalid Vendor-Specific-Application-Id AVP received");
    512500                                                        error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE";
    513501                                                        error->pei_avp = avp;
     
    533521                                if (hdr->avp_value == NULL) {
    534522                                        /* This is a sanity check */
    535                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    536                                         fd_msg_dump_one(NONE, avp);
     523                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    537524                                        ASSERT(0); /* To check if this really happens, and understand why... */
    538525                                        goto next;
     
    549536                                if (hdr->avp_value == NULL) {
    550537                                        /* This is a sanity check */
    551                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    552                                         fd_msg_dump_one(NONE, avp);
     538                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    553539                                        ASSERT(0); /* To check if this really happens, and understand why... */
    554540                                        goto next;
     
    566552                                if (hdr->avp_value == NULL) {
    567553                                        /* This is a sanity check */
    568                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    569                                         fd_msg_dump_one(NONE, avp);
     554                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    570555                                        ASSERT(0); /* To check if this really happens, and understand why... */
    571556                                        goto next;
     
    578563                                if (hdr->avp_value == NULL) {
    579564                                        /* This is a sanity check */
    580                                         TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA");
    581                                         fd_msg_dump_one(NONE, avp);
     565                                        LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code);
    582566                                        ASSERT(0); /* To check if this really happens, and understand why... */
    583567                                        goto next;
  • libfdcore/p_dp.c

    r1010 r1119  
    7676                        if (hdr->avp_value == NULL) {
    7777                                /* This is a sanity check */
    78                                 TRACE_DEBUG(NONE, "BUG: Unset value in Disconnect-Cause in DPR");
    79                                 fd_msg_dump_one(NONE, dc);
     78                                LOG_F("BUG: Unset value in Disconnect-Cause in DPR");
    8079                                ASSERT(0); /* To check if this really happens, and understand why... */
    8180                        }
  • libfdcore/p_dw.c

    r974 r1119  
    5151                if (hdr->avp_value == NULL) {
    5252                        /* This is a sanity check */
    53                         TRACE_DEBUG(NONE, "BUG: Unset value in Origin-State-Id in DWR / DWA");
    54                         fd_msg_dump_one(NONE, osi);
     53                        LOG_F("Ignored an Origin-State-Id AVP with unset value in DWR/DWA");
    5554                        ASSERT(0); /* To check if this really happens, and understand why... */
    5655                }
  • libfdcore/p_out.c

    r1113 r1119  
    132132                                if (msg) {
    133133                                        char buf[256];
    134                                         snprintf(buf, sizeof(buf), "Error while sending this message: s", strerror(ret));
     134                                        snprintf(buf, sizeof(buf), "Error while sending this message: %s", strerror(ret));
    135135                                        fd_hook_call(HOOK_MESSAGE_DROPPED, msg, NULL, buf, fd_msg_pmdl_get(msg));
    136136                                        fd_msg_free(msg);
     
    186186                                if (msg) {
    187187                                        char buf[256];
    188                                         snprintf(buf, sizeof(buf), "Error while sending this message: s", strerror(ret));
     188                                        snprintf(buf, sizeof(buf), "Error while sending this message: %s", strerror(ret));
    189189                                        fd_hook_call(HOOK_MESSAGE_DROPPED, *msg, NULL, buf, fd_msg_pmdl_get(*msg));
    190190                                        fd_msg_free(*msg);
  • libfdcore/p_sr.c

    r1113 r1119  
    8080                        (long)((now.tv_nsec >= sr->added_on.tv_nsec) ? (now.tv_sec - sr->added_on.tv_sec) : (now.tv_sec - sr->added_on.tv_sec - 1)),
    8181                        (long)((now.tv_nsec >= sr->added_on.tv_nsec) ? ((now.tv_nsec - sr->added_on.tv_nsec) / 1000) : ((now.tv_nsec - sr->added_on.tv_nsec + 1000000000) / 1000)));
    82                
    83                 fd_msg_dump_one(ANNOYING + 1, sr->req);
    8482        }
    8583}
  • libfdcore/routing_dispatch.c

    r1113 r1119  
    429429{
    430430        struct msg_hdr * hdr;
    431         int is_req = 0, ret;
     431        int is_req = 0;
    432432        struct session * sess;
    433433        enum disp_action action;
     
    10791079                }
    10801080               
    1081                 if (TRACE_BOOL(FULL)) {
    1082                         TRACE_DEBUG(FULL, "Picked next message (%s)", action_name);
    1083                         fd_msg_dump_one(ANNOYING, msg);
    1084                 }
     1081                LOG_A("%s: Picked next message", action_name);
    10851082
    10861083                /* Now process the message */
Note: See TracChangeset for help on using the changeset viewer.