use gettimeofday

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2502 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-07-20 14:39:34 +00:00
parent a96f5006b8
commit b76abe1162

View File

@@ -52,12 +52,16 @@ krb5_mk_error(krb5_context context,
{
KRB_ERROR msg;
unsigned char buf[1024];
struct timeval tv;
gettimeofday (&tv, NULL);
memset(&msg, 0, sizeof(msg));
msg.pvno = 5;
msg.pvno = 5;
msg.msg_type = krb_error;
msg.stime = time(0);
if(ctime){
msg.stime = tv.tv_sec;
msg.susec = tv.tv_usec;
if(ctime) {
msg.ctime = &ctime;
}
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);
return 0;
}