Changeset 1c535919af2adec9a696426d4642f6b27bef51ac

Show
Ignore:
Timestamp:
05/22/09 12:35:28 (5 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1242995728 +0000
git-parent:

[6adb5a7837cf0e5945ed038897c9b08c7259701c]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1242995728 +0000
Message:

Eventhough I can't repeat the problem, this fixes the reported issue. refs #132

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/ping_icmp.c

    r88a7178 r1c53591  
    101101  data = (struct check_info *)check->closure; 
    102102  for(i=0; i<data->expected_count; i++) 
    103     if(data->turnaround[i] == 0.0) { 
     103    if(data->turnaround[i] < 0.0) { 
    104104      noitL(nldeb, "ping_icmp: %s %d is still outstanding.\n", 
    105105            check->target, i); 
     
    120120  data = (struct check_info *)check->closure; 
    121121  for(i=0; i<data->expected_count; i++) { 
    122     if(data->turnaround[i] != 0) { 
     122    if(data->turnaround[i] >= 0.0) { 
    123123      points++; 
    124124      avg += data->turnaround[i]; 
     
    441441  ci->expected_count = count; 
    442442  if(ci->turnaround) free(ci->turnaround); 
    443   ci->turnaround = calloc(count, sizeof(*ci->turnaround)); 
     443  ci->turnaround = malloc(count * sizeof(*ci->turnaround)); 
    444444 
    445445  ++ci->check_no; 
    446446  for(i=0; i<count; i++) { 
     447    /* Negative means we've not received a response */ 
     448    ci->turnaround[i] = -1.0; 
     449 
    447450    newe = eventer_alloc(); 
    448451    newe->callback = ping_icmp_real_send;