Ticket #39 (closed bug: fixed)

Opened 8 years ago

Last modified 8 years ago

bad timeout conversions in HG_Wait, hg_request_wait

Reported by: jenkins Owned by: somebody
Priority: critical Milestone: mercury-0.8.2
Component: HG Version: git_master
Severity: unspecified Keywords:


In the first line of the HG_Wait and hg_request_wait functions:

double remaining = timeout / 1000; /* Convert timeout in ms into seconds */ 

timeout is an unsigned int, so the resulting computation is truncated at a second granularity before being cast to double. In other words, all waits of < 1000ms are being truncated to no-ops (0s).

Using the double constant 1000.0 for both should do the trick w.r.t. casting.

Change History

comment:1 Changed 8 years ago by jsoumagne

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.