summaryrefslogtreecommitdiff
path: root/ci.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2014-01-22 09:41:08 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2014-01-22 09:41:08 +0100
commit549c499501c375228fb58a7eaf96cb4f65e0d407 (patch)
tree6a2319ed40a7376106eebdc7cdf4433b1a24d63b /ci.c
parent838566ea418c42a7be96417657a5bee70dae2c22 (diff)
downloadvdr-549c499501c375228fb58a7eaf96cb4f65e0d407.tar.gz
vdr-549c499501c375228fb58a7eaf96cb4f65e0d407.tar.bz2
Fixed a wrong alignment in cCiDateTime::SendDateTime()
Diffstat (limited to 'ci.c')
-rw-r--r--ci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ci.c b/ci.c
index 1d55ca7f..7b4aad46 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 3.8 2014/01/16 11:43:33 kls Exp $
+ * $Id: ci.c 3.9 2014/01/22 09:39:06 kls Exp $
*/
#include "ci.h"
@@ -865,7 +865,9 @@ void cCiDateTime::SendDateTime(void)
int L = (M == 1 || M == 2) ? 1 : 0;
int MJD = 14956 + D + int((Y - L) * 365.25) + int((M + 1 + L * 12) * 30.6001);
#define DEC2BCD(d) uint8_t(((d / 10) << 4) + (d % 10))
+#pragma pack(1)
struct tTime { uint16_t mjd; uint8_t h, m, s; short offset; };
+#pragma pack()
tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : short(htons(tm_loc.tm_gmtoff / 60)) };
bool OldDumpTPDUDataTransfer = DumpTPDUDataTransfer;
DumpTPDUDataTransfer &= DumpDateTime;