Navigation


Changeset 1075:54d1cb00331a in freeDiameter


Ignore:
Timestamp:
May 2, 2013, 1:59:58 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Use float type to solve /0 issue

Location:
extensions
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_diameap/diameap_eap.c

    r1052 r1075  
    373373                case EAP_INTEGRITY_CHECK:
    374374                        if ((*eap_sm->selectedMethod->eap_method_check)(eap_sm,
    375                                         eap_i->aaaEapRespData) == FALSE)
     375                                        &eap_i->aaaEapRespData) == FALSE)
    376376                        {
    377377                                TRACE_DEBUG(INFO,"%s[EAP Protocol] Invalid EAP packet received {Type=%d, Vendor=%d}. Integrity check failed (non fatal error).",DIAMEAP_EXTENSION,eap_sm->currentMethod,eap_sm->currentVendor);
     
    434434                        }
    435435                        if ((*eap_sm->selectedMethod->eap_method_process)(eap_sm,
    436                                         eap_i->aaaEapRespData))
     436                                        &eap_i->aaaEapRespData))
    437437                        {
    438438                                TRACE_DEBUG(INFO,"%s[EAP Protocol] [%s plugin] Authentication process failed.",DIAMEAP_EXTENSION,eap_sm->selectedMethod->methodname);
  • extensions/app_diameap/diameap_plugins.c

    r1052 r1075  
    263263                {
    264264                        plugin->eap_method_check = (boolean(*)(struct eap_state_machine *,
    265                                         struct eap_packet)) dlsym(plugin->handler,
     265                                        struct eap_packet*)) dlsym(plugin->handler,
    266266                                        registerplugin->check);
    267267                        if (plugin->eap_method_check == NULL)
     
    285285                {
    286286                        plugin->eap_method_process = (int(*)(struct eap_state_machine *,
    287                                         struct eap_packet)) dlsym(plugin->handler,
     287                                        struct eap_packet*)) dlsym(plugin->handler,
    288288                                        registerplugin->process);
    289289                        if (plugin->eap_method_process == NULL)
  • extensions/app_diameap/libdiameap.h

    r610 r1075  
    110110        int (*eap_method_getTimeout)(struct eap_state_machine *smd, int * timeout); /* address of the eap_method_getTimeout method */
    111111        boolean (*eap_method_check)(struct eap_state_machine *smd,
    112                         struct eap_packet eapRespData); /* address of the eap_method_check method */
     112                        struct eap_packet * eapRespData); /* address of the eap_method_check method */
    113113        int (*eap_method_process)(struct eap_state_machine *smd,
    114                         struct eap_packet eapRespData); /* address of the eap_method_process method */
     114                        struct eap_packet * eapRespData); /* address of the eap_method_process method */
    115115        boolean (*eap_method_isDone)(struct eap_state_machine *smd); /* address of the eap_method_isDone method */
    116116        int (*eap_method_getKey)(struct eap_state_machine *smd, u8 ** msk,int *msklength,
  • extensions/dbg_monitor/dbg_monitor.c

    r1072 r1075  
    5656                        struct timespec * total, struct timespec * blocking, struct timespec * last)
    5757{
    58         long long throughput = (total_count * 1000000000) / ((total->tv_sec * 1000000000) + total->tv_nsec);
     58        long long ms = (total->tv_sec * 1000000) + (total->tv_nsec / 1000);
     59        long double throughput = (long double)total_count * 1000000;
     60        throughput /= ms;
    5961        if (peer) {
    60                 TRACE_DEBUG(INFO, "'%s'@'%s': cur:%d/%d, h:%d, T:%lld in %ld.%06lds (%llditems/s), blocked:%ld.%06lds, last processing:%ld.%06lds",
     62                TRACE_DEBUG(INFO, "'%s'@'%s': cur:%d/%d, h:%d, T:%lld in %ld.%06lds (%.2LFitems/s), blocked:%ld.%06lds, last processing:%ld.%06lds",
    6163                        queue_desc, peer, current_count, limit_count, highest_count,
    6264                        total_count, total->tv_sec, total->tv_nsec, throughput,
    6365                        blocking->tv_sec, blocking->tv_nsec, last->tv_sec, last->tv_nsec);
    6466        } else {
    65                 TRACE_DEBUG(INFO, "Global '%s': cur:%d/%d, h:%d, T:%lld in %ld.%06lds (%llditems/s), blocked:%ld.%06lds, last processing:%ld.%06lds",
     67                TRACE_DEBUG(INFO, "Global '%s': cur:%d/%d, h:%d, T:%lld in %ld.%06lds (%.2LFitems/s), blocked:%ld.%06lds, last processing:%ld.%06lds",
    6668                        queue_desc, current_count, limit_count, highest_count,
    6769                        total_count, total->tv_sec, total->tv_nsec, throughput,
Note: See TracChangeset for help on using the changeset viewer.