libfreerdp-core: cleaned up a bunch of debug printing

libfreerdp-local: disabled a block pertaining to the use of timezone rules. This seems to make timezone and time to be set correctly on the server side but Issue #574 should not (yet) be closed.
This commit is contained in:
C-o-r-E 2012-07-30 15:52:45 -04:00
parent 0182da3f2f
commit ae6865a592
2 changed files with 4 additions and 10 deletions

View File

@ -133,10 +133,7 @@ void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings)
/* UTC = LocalTime + Bias <-> Bias = UTC - LocalTime */
printf("std=%u\nday=%u\nclBias=%u",clientTimeZone->standardBias, clientTimeZone->daylightBias, clientTimeZone->bias);
bias = 1440 - clientTimeZone->bias;
printf("send bias %u\n", bias);
stream_write_uint32(s, bias); /* Bias */
/* standardName (64 bytes) */
@ -146,12 +143,10 @@ void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings)
rdp_write_system_time(s, &clientTimeZone->standardDate); /* StandardDate */
sbias = clientTimeZone->standardBias - clientTimeZone->bias;
printf("sbias = %d\n", sbias);
if (sbias < 0)
bias2c = (uint32) sbias;
else
bias2c = ~((uint32) sbias) + 1;
printf("send bias2c %08X\n", bias2c);
stream_write_uint32(s, bias2c); /* StandardBias */
/* daylightName (64 bytes) */
@ -166,7 +161,6 @@ void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings)
bias2c = (uint32) sbias;
else
bias2c = ~((uint32) sbias) + 1;
printf("send bias2c %08X\n", bias2c);
stream_write_uint32(s, bias2c); /* DaylightBias */
xfree(standardName);

View File

@ -1629,10 +1629,12 @@ TIME_ZONE_RULE_ENTRY* freerdp_get_current_time_zone_rule(TIME_ZONE_RULE_ENTRY* r
{
if ((rules[i].TicksStart <= windows_time) && (windows_time >= rules[i].TicksEnd))
{
/*printf("Got rule %d from table at %p with count %u\n", i, rules, count);*/
return &rules[i];
}
}
printf("Unable to get current timezone rule\n");
return NULL;
}
@ -1647,7 +1649,6 @@ void freerdp_time_zone_detect(TIME_ZONE_INFO* clientTimeZone)
local_time = localtime(&t);
#ifdef HAVE_TM_GMTOFF
printf("tm_gmtoff = %ld\n", local_time->tm_gmtoff);
if (local_time->tm_gmtoff >= 0)
{
sbias = local_time->tm_gmtoff / 60;
@ -1666,7 +1667,6 @@ void freerdp_time_zone_detect(TIME_ZONE_INFO* clientTimeZone)
#else
clientTimeZone->bias = 0;
#endif
printf("tm_isdst = %d\n\tcliBias = %u\n", local_time->tm_isdst, clientTimeZone->bias);
if (local_time->tm_isdst > 0)
{
clientTimeZone->standardBias = clientTimeZone->bias - 60;
@ -1677,13 +1677,11 @@ void freerdp_time_zone_detect(TIME_ZONE_INFO* clientTimeZone)
clientTimeZone->standardBias = clientTimeZone->bias;
clientTimeZone->daylightBias = clientTimeZone->bias + 60;
}
printf("\tstdBias = %u, dayBias = %u\n", clientTimeZone->standardBias, clientTimeZone->daylightBias);
tz = freerdp_detect_windows_time_zone(clientTimeZone->bias);
if (tz!= NULL)
{
printf("%u, %s, %s\n", tz->Bias,tz->StandardName ,tz->DaylightName);
clientTimeZone->bias = tz->Bias;
sprintf(clientTimeZone->standardName, "%s", tz->StandardName);
sprintf(clientTimeZone->daylightName, "%s", tz->DaylightName);
@ -1693,6 +1691,7 @@ void freerdp_time_zone_detect(TIME_ZONE_INFO* clientTimeZone)
TIME_ZONE_RULE_ENTRY* rule;
rule = freerdp_get_current_time_zone_rule(tz->RuleTable, tz->RuleTableCount);
/* issue #574 -- temporarily disabled this block as it seems to be setting the wrong time
if (rule != NULL)
{
clientTimeZone->standardBias = 0;
@ -1716,6 +1715,7 @@ void freerdp_time_zone_detect(TIME_ZONE_INFO* clientTimeZone)
clientTimeZone->daylightDate.wSecond = rule->DaylightDate.wSecond;
clientTimeZone->daylightDate.wMilliseconds = rule->DaylightDate.wMilliseconds;
}
*/
}
xfree(tz);