On 29/08/06, <[EMAIL PROTECTED]> wrote:
> In mib2c.old-api.conf approach ( 5.2.1 version in Fedora ), for
> DateAndTime OIDs, I am retuning the value as
>
> return (u_char *) "1970-1-1,0:0:0.0,-0:0";
No - that's not correct.
Please read the description of DateAndTime in SNM
"David T. Perkins" wrote:
David> ... the function gmtime should be replaced by the thread-safe versionDavid> called gmtime_r ...
I agree
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
HI,
Oh, by the way, I forgot to mention that the function
gmtime should be replaced by the thread-safe version
called gmtime_r, which has signature:
struct tm *gmtime_r(cont time_t *clock, struct tm *result)
Ok, I see why you need the length.
On Tue, 28 Dec 2004, Elisabeth Gloria wrote:
> Hi
Hi David,
OK, please consider following changed code.
I accept you criticism concerning thread safe issue.
Concerning 'len', see comments inthe edge of the function.
typedef struct snmp_data_and_time_s { unsigned short year; unsigned char month; unsigned char day; unsigned char hour; unsi
HI,
Your example below is not thread-safe. I suggest that you
change it to pass in a pointer to a place to store the
result instead of using static "dtt" in the function
(and remove the "len" argument, since it is not needed).
That is, change the function signature to:
DT_T *AGUTIL_get_date_and_
I do have such one, you may try to use it:
char * AGUTIL_get_date_and_time (time_t * tv,
size_t * len){ typedef struct snmp_data_and_time_s { unsigned short year; unsigned char month; unsigned char day; unsigned char hour; unsigned char minutes;
> On Mon, 15 Nov 2004 13:11:42 +0100 (MET), "Sven Jonas" <[EMAIL
> PROTECTED]> said:
Sven> is there any funtion that converts an u_char time[11] to a
Sven> time_t-Struct?
Nope, but if you write one please send it to us!
--
Wes Hardaker
Sparta
-