use gettimeofday
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2502 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -52,12 +52,16 @@ krb5_mk_error(krb5_context context,
|
|||||||
{
|
{
|
||||||
KRB_ERROR msg;
|
KRB_ERROR msg;
|
||||||
unsigned char buf[1024];
|
unsigned char buf[1024];
|
||||||
|
struct timeval tv;
|
||||||
|
|
||||||
|
gettimeofday (&tv, NULL);
|
||||||
|
|
||||||
memset(&msg, 0, sizeof(msg));
|
memset(&msg, 0, sizeof(msg));
|
||||||
msg.pvno = 5;
|
msg.pvno = 5;
|
||||||
msg.msg_type = krb_error;
|
msg.msg_type = krb_error;
|
||||||
msg.stime = time(0);
|
msg.stime = tv.tv_sec;
|
||||||
if(ctime){
|
msg.susec = tv.tv_usec;
|
||||||
|
if(ctime) {
|
||||||
msg.ctime = &ctime;
|
msg.ctime = &ctime;
|
||||||
}
|
}
|
||||||
msg.error_code = error_code;
|
msg.error_code = error_code;
|
||||||
@@ -76,4 +80,3 @@ krb5_mk_error(krb5_context context,
|
|||||||
memcpy(reply->data, buf + sizeof(buf) - reply->length, reply->length);
|
memcpy(reply->data, buf + sizeof(buf) - reply->length, reply->length);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user