News:

Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

Is really the timeOffset send correctly from the vompserver?

Started by sirwio, October 08, 2006, 14:55:03

Previous topic - Next topic

sirwio

Hi,

I noticed that the time on my vompclient was 2 hours wrong. 2 ours off where I live usually means that the timezone information is wrong. When I debuged this I found out that the read offset at the vompclient was always zero. I suspect that the timeOffset send is send in the wrong way. If I change vompserver code according to the diff below the time is set correct on the client. I'm not experienced at using the htonl functions so I may be wrong. The type of the tm_gmtoff member should however be long!


===================================================================
RCS file: /cvsroot/vomp/vompserver/mvpclient.c,v
retrieving revision 1.38
diff -r1.38 mvpclient.c
277c277
<   int timeOffset = timeStruct->tm_gmtoff;
---
>   long timeOffset = timeStruct->tm_gmtoff;
282c282
<   *(signed int*)&sendBuffer[8] = htonl(timeOffset);
---
>   *(ULONG*)&sendBuffer[8] = htonl(timeOffset);


- Magnus