Commit c0181cb3 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(prot_a_parse_misc_info): This code used to convert the broken-down

	time to a time_t using mktime().  The value was never used.
	Instead of introducing a portability problem using by calling
	timelocal(), we now simply store a 0 in the time field of
	rec_time and sent_at misc-infos.
parent 033ea963
/*
* $Id: prot-a-parse.c,v 0.61 2003/08/16 15:30:31 ceder Exp $
* $Id: prot-a-parse.c,v 0.62 2003/08/16 17:38:24 ceder Exp $
* Copyright (C) 1991-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -685,7 +685,14 @@ prot_a_parse_misc_info(Connection *client,
case rec_time:
prot_a_parse_time_date(client, &tmp_time);
result->datum.received_at = mktime(&tmp_time);
/* This value is never used. It is illegal to send a
rec_time to the server. To avoid portability problems
with timegm() we simply store a 0, instead of switching
between using timegm or mktime depending on the use_utc
setting. We used to store "mktime(&tmp_time)". */
result->datum.received_at = 0;
break;
case sent_by:
......@@ -694,7 +701,14 @@ prot_a_parse_misc_info(Connection *client,
case sent_at:
prot_a_parse_time_date(client, &tmp_time);
result->datum.sent_at = mktime(&tmp_time);
/* This value is never used. It is illegal to send a
sent_at to the server. To avoid portability problems
with timegm() we simply store a 0, instead of switching
between using timegm or mktime depending on the use_utc
setting. We used to store "mktime(&tmp_time)". */
result->datum.sent_at = 0;
break;
default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment