--=_74ecd3ee77883b2d7bc5bdd6cf7adf54
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Hi Net-SNMP Users,I am facing the issue mentioned in the link below:http://sourceforge.net/tracker/index.php?func=detail&aid=418335&group_id=12694&atid=112694I just want to fix this in my application using ucd-snmp 4.2.3 (without migrating to latest version).When I do diff between latest version and the old version agent/mibgroups/util_func.c and .h file,I can see they modified the return type for sysUptime to u_long from int as given below:<diff>=========================================*** util_funcs.c Tue Sep 24 16:00:08 2002--- /tmp/rh73-ucdsnmp-423/agent/mibgroup/util_funcs.c Mon Sep 24 08:52:10 2007****************** 924,933 **** extern struct timeval starttime; /* Return the value of \'sysUpTime\' at the given marker */! int marker_uptime( marker_t pm ) {! int res; marker_t start = (marker_t)&starttime; res = atime_diff( start, pm );--- 924,933 ---- extern struct timeval starttime; /* Return the value of \'sysUpTime\' at t
he given marker */! u_long marker_uptime( marker_t pm ) {! u_long res; marker_t start = (marker_t)&starttime; res = atime_diff( start, pm );****************** 935,944 **** } /* Return the number of timeTicks since the given marker */! int marker_tticks( marker_t pm ) {! int res; marker_t now = atime_newMarker(); res = atime_diff( pm, now );--- 935,944 ---- } /* Return the number of timeTicks since the given marker */! u_long marker_tticks( marker_t pm ) {! u_long res; marker_t now = atime_newMarker(); res = atime_diff( pm, now );****************** 947,958 **** } /* struct timeval equivalents of these */! int timeval_uptime( struct timeval *tv ) { return marker_uptime((marker_t)tv); } ! int timeval_tticks( struct timeval *tv ) { return marker_tticks((marker_t)tv); }--- 947,958 ---- } /* struct timeval equivalents of these */! u_long timeval_uptime( struct timeval *tv ) { retur
n marker_uptime((marker_t)tv); } ! u_long timeval_tticks( struct timeval *tv ) { return marker_tticks((marker_t)tv); }*** util_funcs.h Tue Sep 24 16:00:08 2002--- /tmp/rh73-ucdsnmp-423/agent/mibgroup/util_funcs.h Mon Sep 24 08:49:50 2007****************** 42,49 **** int Add_Entry( mib_table_t, void*); void *Retrieve_Table_Data( mib_table_t, int*); ! int marker_uptime( marker_t pm );! int marker_tticks( marker_t pm );! int timeval_uptime( struct timeval *tv );! int timeval_tticks( struct timeval *tv ); #endif /* _MIBGROUP_UTIL_FUNCS_H */--- 42,49 ---- int Add_Entry( mib_table_t, void*); void *Retrieve_Table_Data( mib_table_t, int*); ! u_long marker_uptime( marker_t pm );! u_long marker_tticks( marker_t pm );! u_long timeval_uptime( struct timeval *tv );! u_long timeval_tticks( struct timeval *tv ); #endif /* _MIBGROUP_UTIL_FUNCS_H */</diff>I modified the same in the src file and did make install to compile/install the changes.But, still it is not refl
ected in my application. Could someone please shed some light on this?It would be very much approciated.Regards,Arul
--=_74ecd3ee77883b2d7bc5bdd6cf7adf54
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Net-SNMP Users,<br /><br />I am facing the issue mentioned in the link b=
elow:<br />http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=
=3D418335&group_id=3D12694&atid=3D112694<br /><br />I just want to =
fix this in my application using ucd-snmp 4.2.3 (without migrating to lates=
t version).<br />When I do diff between latest version and the old version =
agent/mibgroups/util_func.c and .h file,<br />I can see they modified the r=
eturn type for sysUptime to u_long from int as given below:<br /><br /><=
diff><br /><pre wrap=3D"">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D<br />*** util_funcs.c Tue Sep 24 16:00:08 2002<br />--- /tmp/rh73-ucdsn=
mp-423/agent/mibgroup/util_funcs.c Mon Sep 24 08:52:10 2007<br />**********=
*****<br />*** 924,933 ****<br /> extern struct timeval starttime;<br /> =
<br /> /* Return the value of 'sysUpTime' at the given marker */<br />! =
int<br /> marker_uptime( marker_t pm )<br /> {<br />! int res;<br /> =
marker_t start =3D (marker_t)&starttime;<br /> <br /> res =3D at=
ime_diff( start, pm );<br />--- 924,933 ----<br /> extern struct timeval s=
tarttime;<br /> <br /> /* Return the value of 'sysUpTime' at the given =
marker */<br />! u_long<br /> marker_uptime( marker_t pm )<br /> {<br />!=
u_long res;<br /> marker_t start =3D (marker_t)&starttime;<br /> =
<br /> res =3D atime_diff( start, pm );<br />***************<br />***=
935,944 ****<br /> }<br /> <br /> /* Return the number of timeTicks s=
ince the given marker */<br />! int<br /> marker_tticks( marker_t pm )<br =
/> {<br />! int res;<br /> marker_t now =3D atime_newMarker();<br=
/> <br /> res =3D atime_diff( pm, now );<br />--- 935,944 ----<br />=
}<br /> <br /> /* Return the number of timeTicks since the given mark=
er */<br />! u_long<br /> marker_tticks( marker_t pm )<br /> {<br />! =
u_long res;<br /> marker_t now =3D atime_newMarker();<br /> <br /> =
res =3D atime_diff( pm, now );<br />***************<br />*** 947,958 **=
**<br /> }<br /> <br /> /* struct timeval equivalents of these */<br =
/>! int timeval_uptime( struct timeval *tv )<br /> {<br /> return mar=
ker_uptime((marker_t)tv);<br /> }<br /> <br />! int timeval_tticks( struc=
t timeval *tv )<br /> {<br /> return marker_tticks((marker_t)tv);<br =
/> }<br />--- 947,958 ----<br /> }<br /> <br /> /* struct timeval eq=
uivalents of these */<br />! u_long timeval_uptime( struct timeval *tv )<br=
/> {<br /> return marker_uptime((marker_t)tv);<br /> }<br /> <br /=
>! u_long timeval_tticks( struct timeval *tv )<br /> {<br /> return m=
arker_tticks((marker_t)tv);<br /> }<br />*** util_funcs.h Tue Sep 24 16:00=
:08 2002<br />--- /tmp/rh73-ucdsnmp-423/agent/mibgroup/util_funcs.h Mon Sep=
24 08:49:50 2007<br />***************<br />*** 42,49 ****<br /> int Add_=
Entry( mib_table_t, void*);<br /> void <b class=3D"moz-txt-star"><span cla=
ss=3D"moz-txt-tag">*</span>Retrieve_Table_Data( mib_table_t, int<span class=
=3D"moz-txt-tag">*</span></b>);<br /> <br />! int marker_uptime( marker_t =
pm );<br />! int marker_tticks( marker_t pm );<br />! int timeval_uptime( s=
truct timeval *tv );<br />! int timeval_tticks( struct timeval *tv );<br />=
#endif /* _MIBGROUP_UTIL_FUNCS_H */<br />--- 42,49 ----<br /> int Add_E=
ntry( mib_table_t, void*);<br /> void <b class=3D"moz-txt-star"><span clas=
s=3D"moz-txt-tag">*</span>Retrieve_Table_Data( mib_table_t, int<span class=
=3D"moz-txt-tag">*</span></b>);<br /> <br />! u_long marker_uptime( marker=
_t pm );<br />! u_long marker_tticks( marker_t pm );<br />! u_long timeval_=
uptime( struct timeval *tv );<br />! u_long timeval_tticks( struct timeval =
*tv );<br /><br /> #endif /* _MIBGROUP_UTIL_FUNCS_H */</pre></diff><=
br /><br />I modified the same in the src file and did make install to comp=
ile/install the changes.<br />But, still it is not reflected in my applicat=
ion. <br /><br />Could someone please shed some light on this?<br />I=
t would be very much approciated.<br /><br />Regards,<br />Arul<br />
<br>
--=_74ecd3ee77883b2d7bc5bdd6cf7adf54--
--===============0906243491==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
--===============0906243491==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
--===============0906243491==--
> I just want to fix this in my application using ucd-snmp
> 4.2.3 (without migrating to latest version).
> When I do diff between latest version and the old version
> agent/mibgroups/util_func.c and .h file,
> I can see they modified the return type for sysUptime to
> u_long from int as given below:
<SNIP/>
> I modified the same in the src file and did make install to
> compile/install the changes.
> But, still it is not reflected in my application.
>
> Could someone please shed some light on this?
> It would be very much approciated.
Yes. Quite simply, there were more changes than the one file needed to fix the problem. In fact 4->5 was quite the rewrite, so it appears this problem was never fixed in version 4.
If you want to continue using version 4, and do not have a workaround for this issue, then you will need to fix this bug yourself, as it is most likely that there is noone left doing active development on that branch.
Your magical clue is that 2^31 ms = 24.8551 d, and 2^32 ticks - 2^31 ms = 472.2476 days!
Enjoy!
Mike
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Confirmed.
There has been little or no active development of the v4 line for around
five years now. The 4.2.7 release (on Jan 1st this year) was purely to
consolidate the various bug fixes that had accumulated over that time.
We do not envisage doing any more work on the 4.2.x code (barring
*VERY* exceptional circumstances).
If you continue to use this line of code, then you are very much on
your own, I'm afraid. The project has moved on significantly in the
last five years, and we do not have the resources to support such
ancient code.
Dave