[Nagiosplug-devel] [ nagiosplug-Patches-1185713 ] PATCH: check_time for 64bit long systems

SourceForge.net noreply at sourceforge.net
Wed May 25 10:45:35 CEST 2005


Patches item #1185713, was opened at 2005-04-19 03:49
Message generated for change (Comment added) made by sghosh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1185713&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Bugfix
Group: None
>Status: Pending
Resolution: None
Priority: 5
Submitted By: Peter Bray (illumino)
>Assigned to: Subhendu Ghosh (sghosh)
Summary: PATCH: check_time for 64bit long systems 

Initial Comment:

check_time provides an incorrect result on systems
using 64bit longs (such as Solaris 9 / SPARCv9 /
gcc-sparcv9-3.4.3) as the data returned off the network
socket read, is placed in the upper half of the 64bit
unsigned long and not the lower half. The function in
question ntohl on Solaris takes a uint32_t not a long,
changing the type of the variables used fixed the problem.

I have not verified that the type "uint32_t" is
available of all systems (eg Linux, OSX, *BSD, ...) but
the use of unsigned long is incorrect (I believe) is it
is variable by platform & compiler.

The following is a summary of the attached patch:
OLD:  unsigned long  server_time, raw_server_time;
NEW: uint32_t          server_time, raw_server_time;

Regards,
Peter Bray
Sydney, Australia

----------------------------------------------------------------------

>Comment By: Subhendu Ghosh (sghosh)
Date: 2005-05-25 13:42

Message:
Logged In: YES 
user_id=46572

patch applied

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1185713&group_id=29880




More information about the Devel mailing list