sync: added workarounds for firmware hang issue
commit80828fb20f83e22e4ffaffac87452fd7306f858e
authorChris Frey <cdfrey@foursquare.net>
Tue, 20 Jul 2010 03:15:38 +0000 (19 23:15 -0400)
committerChris Frey <cdfrey@foursquare.net>
Tue, 20 Jul 2010 03:24:46 +0000 (19 23:24 -0400)
tree3ed6363689935abb03cd7527128999e6033c2824
parent6c9905ba1310c49c437b40788c3cdd54d8d9f1be
sync: added workarounds for firmware hang issue

This workaround overrides the timeout due to a firmware issue: sometimes
the firmware will hang during a plugin Reconnect(), during the shutdown
stage when the plugin attempts to update the device's dirty flags.
When the device hangs like this, it fails to respond to a Desktop::Open().
To work around this, we set the default timeout to 15 seconds so that
we find this failure early enough to fix it within opensync's 30 second
timeout.  Then if we get such a timeout, we do the Reconnect again and
hope for the best... this often fixes it.

Applied to both plugins.
ChangeLog
opensync-plugin-0.4x/src/environment.cc
opensync-plugin/src/environment.cc