From 0798d54b4fc28be881e2c4012663b1461bc85ba7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 3 Feb 2005 11:25:52 +0000 Subject: r5195: most events don't need the time of the event, so save a gettimeofday() call and just use timeval_current() when its actually needed (This used to be commit 236403cc4dc2924ed6a898acae0bb44cc1688dcc) --- source4/smb_server/smb_server.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/smb_server/smb_server.c') diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index f1f73014f1..3946e9ab13 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -67,7 +67,7 @@ static void construct_reply(struct smbsrv_request *req); receive a SMB request header from the wire, forming a request_context from the result ****************************************************************************/ -static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn, struct timeval t) +static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn) { NTSTATUS status; ssize_t len; @@ -140,7 +140,7 @@ static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn, struct t } /* we have a full packet */ - req->request_time = t; + req->request_time = timeval_current(); req->chained_fnum = -1; req->in.allocated = req->in.size; req->in.hdr = req->in.buffer + NBT_HDR_SIZE; @@ -653,14 +653,14 @@ void smbsrv_terminate_connection(struct smbsrv_connection *smb_conn, const char /* called when a SMB socket becomes readable */ -static void smbsrv_recv(struct stream_connection *conn, struct timeval t, uint16_t flags) +static void smbsrv_recv(struct stream_connection *conn, uint16_t flags) { struct smbsrv_connection *smb_conn = talloc_get_type(conn->private, struct smbsrv_connection); NTSTATUS status; DEBUG(10,("smbsrv_recv\n")); - status = receive_smb_request(smb_conn, t); + status = receive_smb_request(smb_conn); if (NT_STATUS_IS_ERR(status)) { talloc_free(conn->event.fde); conn->event.fde = NULL; @@ -675,7 +675,7 @@ static void smbsrv_recv(struct stream_connection *conn, struct timeval t, uint16 /* called when a SMB socket becomes writable */ -static void smbsrv_send(struct stream_connection *conn, struct timeval t, uint16_t flags) +static void smbsrv_send(struct stream_connection *conn, uint16_t flags) { struct smbsrv_connection *smb_conn = talloc_get_type(conn->private, struct smbsrv_connection); -- cgit