https://bugzilla.novell.com/show_bug.cgi?id=410736 Summary: User ID check in J-Pilot fails on every sync when it is >= 2^31 on 64-bit systems, prompting the user on each sync Product: openSUSE 11.0 Version: Final Platform: x86-64 OS/Version: openSUSE 11.0 Status: NEW Severity: Normal Priority: P5 - None Component: Mobile Devices AssignedTo: zoz@novell.com ReportedBy: slawrance@yahoo.com QAContact: qa@suse.de Found By: Customer The user ID check in J-Pilot unfortunately fails on every sync on a two's-complement 64-bit system when the user ID is >= 2^31. The user ID in the Palm and in the data structures is unsigned, but it's signed in some local variables and in the logs. The user ID on the Palm appears to be a 32-bit number, but on x86_64, a negative number loaded from the configuration gets loaded into a 64-bit integer with two's complement. Instead of the 32 most significant bits being 0, they are 1. When the integer check from the Palm with the last-known value is compared, the comparison fails. This was difficult to detect from the logs, which wrote out the 64-bit integers using a 32-bit printf() format argument. I fixed this by forcing unsigned wherever user IDs and computer IDs were referenced (computer ID had a similar potential issue). Ideally, the IDs should be locked to uint32_t, but my patch to simply use unsigned everywhere worked for me, so I didn't bother with the data type change. In J-Pilot 0.99.9-198.1, I would always see the attached screen shot with the following messages logged: Last Synced Username-->"Steven Lawrance" Last Synced UserID-->"-1093343998" This Username-->"Steven Lawrance" This User ID-->-1093343998 Username is "Steven Lawrance" User ID is -1093343998 lastSyncPC = 111726531 This PC = 111726531 After my fix, which I attached as a patch, the first sync produced the following message and the same attached warning message: Last Synced Username-->"Steven Lawrance" Last Synced UserID-->"18446744072616207618" This Username-->"Steven Lawrance" This User ID-->3201623298 Username is "Steven Lawrance" User ID is 3201623298 lastSyncPC = 111726531 This PC = 111726531 After that first sync, subsequent syncs worked without the user warning :-). Furthermore, the ~/.jpilot/jpilot.rc file's user_id is no longer negative on my 64-bit system (I suspect that this will still be negative on a 32-bit system, but that should be okay). Username is "Steven Lawrance" User ID is 3201623298 lastSyncPC = 111726531 This PC = 111726531 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.