On Tue, 2008-04-22 at 22:39 +0100, Mark Ellis wrote:
>
> On Tue, 2008-04-22 at 19:54 +0400, Ilya Bakulin wrote:
> > On Mon, 21 Apr 2008 19:28:32 +0100
> > Mark Ellis <[EMAIL PROTECTED]> wrote:
> >
> > > You're not wrong, in fact sync-engine appears to not be set up to deal
> > > with locked WM6 in general, this is not just on hal. Your patch is on
> > > the right lines, but I've got a nasty feeling it wont work in all cases,
> > > I just need to think about it.
> > >
> > > With any luck Guido or John are reading and may be able to pitch in.
> > >
> >
> > OK, I'll continue testing SyncEngine working with this patch. By now I
> > haven't encountered any problems. Perhaps you could advise me what to do to
> > see if it will fail?
> >
> > As I understand, device lock-state shouldn't change once it's connected and
> > unlocked?
>
> You're right, it shouldn't change, except for the locked to unlocked
> changed when you authenticate. The problem is that WM5 can be unlocked
> directly by the sync-engine auth procedure (and also indirectly if
> something else authenticates) while WM6 is always a more indirect
> process.
>
Ok, this looks ok, and works with WM5, can you try it with WM6. John,
you're the expert, does this look ok ?
Mark
diff -Nur sync-engine.orig/SyncEngine/auth.py sync-engine/SyncEngine/auth.py
--- sync-engine.orig/SyncEngine/auth.py 2008-04-16 17:26:17.000000000 +0100
+++ sync-engine/SyncEngine/auth.py 2008-04-21 19:07:15.000000000 +0100
@@ -17,6 +17,7 @@
ODCCM_DEVICE_PASSWORD_FLAG_SET = 1
ODCCM_DEVICE_PASSWORD_FLAG_PROVIDE = 2
+ODCCM_DEVICE_PASSWORD_FLAG_PROVIDE_ON_DEVICE = 4
HAL_DEVICE_PASSWORD_FLAG_UNSET = "unset"
HAL_DEVICE_PASSWORD_FLAG_PROVIDE = "provide"
@@ -37,12 +38,12 @@
def IsAuthRequired(device):
if re.compile('/org/freedesktop/Hal/devices/').match(device.object_path) != None:
flags = device.GetPropertyString("pda.pocketpc.password")
- if flags == "provide":
+ if flags == "provide" or flags == "provide-on-device":
return True
return False
flags = device.GetPasswordFlags()
- if flags & ODCCM_DEVICE_PASSWORD_FLAG_PROVIDE:
+ if flags & ODCCM_DEVICE_PASSWORD_FLAG_PROVIDE or flags & ODCCM_DEVICE_PASSWORD_FLAG_PROVIDE_ON_DEVICE:
return True
return False
diff -Nur sync-engine.orig/SyncEngine/kernel.py sync-engine/SyncEngine/kernel.py
--- sync-engine.orig/SyncEngine/kernel.py 2008-04-16 17:26:17.000000000 +0100
+++ sync-engine/SyncEngine/kernel.py 2008-04-21 22:07:07.000000000 +0100
@@ -319,7 +319,9 @@
def _CBDeviceAuthStateChanged(self,added,removed):
self.logger.info("_CBDeviceAuthStateChanged: device authorization state changed: reauthorizing")
- self._ProcessAuth()
+ if not self.isConnected:
+ if self._ProcessAuth():
+ self.OnConnect()
#
# _CBHalDeviceAuthStateChanged
@@ -335,7 +337,9 @@
property_name, added, removed = property
if property_name == "pda.pocketpc.password":
self.logger.info("_CBHalDeviceAuthStateChanged: device authorization state changed: reauthorizing")
- self._ProcessAuth()
+ if not self.isConnected:
+ if self._ProcessAuth():
+ self.OnConnect()
#
# _CheckAndGetValidPartnership
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
SynCE-Devel mailing list
SynCE-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel