1 /*
2  * Copyright 1993 Network Computing Devices, Inc.
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and its
5  * documentation for any purpose is hereby granted without fee, provided that
6  * the above copyright notice appear in all copies and that both that
7  * copyright notice and this permission notice appear in supporting
8  * documentation, and that the name Network Computing Devices, Inc. not be
9  * used in advertising or publicity pertaining to distribution of this
10  * software without specific, written prior permission.
11  *
12  * THIS SOFTWARE IS PROVIDED 'AS-IS'.  NETWORK COMPUTING DEVICES, INC.,
13  * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
14  * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
15  * PARTICULAR PURPOSE, OR NONINFRINGEMENT.  IN NO EVENT SHALL NETWORK
16  * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
17  * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA,
18  * OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF
19  * WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN
20  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21  *
22  * $NCDId: @(#)GetSvrTime.c,v 1.1 1993/05/07 19:09:06 greg Exp $
23  */
24 
25 #include "Alibint.h"
26 
27 AuTime
AuGetServerTime(AuServer * aud,AuStatus * ret_status)28 AuGetServerTime(
29                 AuServer       *aud,
30                 AuStatus       *ret_status
31                 )
32 {
33     auReq *req;
34     auGetServerTimeReply rep;
35 
36     if (ret_status)
37 	*ret_status = AuSuccess;
38 
39     _AuLockServer();
40     _AuGetEmptyReq(GetServerTime, req, aud);
41 
42     (void) _AuReply(aud, (auReply *) & rep, 0, auFalse, ret_status);
43 
44     _AuUnlockServer();
45     _AuSyncHandle(aud);
46 
47     return rep.time;
48 }
49