Summary | ActiveSync: SQL error with HTC Sensation |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | thomas.jarosch (at) intra2net (dot) com |
Created | 04/03/2013 (4487 days ago) |
Due | |
Updated | 04/04/2013 (4486 days ago) |
Assigned | 04/04/2013 (4486 days ago) |
Resolved | 04/04/2013 (4486 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
except you squeezed it all in one line. I wanted to
avoid that for readability ;)
Anyhow, I'm pretty sure it will work as I've tested my patch.
State ⇒ Feedback
commit a32b5c055d6b6670e3847f1340e1a87c6bf07860
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Thu Apr 4 10:40:06 2013 -0400
Another attempt at working around broken HTC clients.
Bug: 12154.../ActiveSync/lib/Horde/ActiveSync/State/Sql.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/a32b5c055d6b6670e3847f1340e1a87c6bf07860
User-Agent settings data.
Once again, a spec that exists purely for the author's amusement.
New Attachment: 0001-Proper-fix-for-missing-User-Agent-header-bug-12154.patch
What do you think?
the error.
I'm not sure if the fix before setDeviceInfo() is good enough.
setDeviceInfo() does an "INSERT INTO" while the error message below
contains an "UPDATE" SQL statement.
I think the real problem is in setDeviceProperties() since
setDeviceInfo() already handles empty "$data->userAgent" strings.
Error message:
------------------------------------
2013-04-04T15:39:53+02:00 ERR: HORDE [horde] SQL QUERY FAILED:
SQLSTATE[23000]: Integrity constraint violation: 19
horde_activesync_device.device_agent may not be NULL
UPDATE horde_activesync_device SET device_properties =
'a:5:{s:14:"Settings:Model";s:17:"HTCSensationZ710e";s:11:"Settings:OS
";s:13:"Android 4.0.3";s:21:"Settings:FriendlyName";s:19:"HTC
Sensation
Z710e";s:13:"Settings:IMEI";s:16:"************3379";s:20:"Settings:Pho
neNumber";s:13:"Not Available";}', device_agent = NULL
WHERE device_id
= 'HTC6C4153F09B63EAC481259E1F2E139' [pid 18297 on line 553
of "/datastore/DEVEL/horde/framework/Db/lib/Horde/Db/Adapter/Base.php"
------------------------------------
I've also doubled-checked the new code is in place:
# pwd
/var/www/horde/libs/Horde
# ls -al ActiveSync.php
lrwxrwxrwx 1 root root 68 2013-04-03 14:33 ActiveSync.php ->
/datastore/DEVEL/horde/framework/ActiveSync/lib/Horde/ActiveSync.php
# grep userAgent ActiveSync.php
$userAgent = $this->_request->getHeader('User-Agent');
$device->userAgent = empty($userAgent) ? 'Unknown' : $userAgent;
commit 8f52b6b106875d63235f6d06147e897a2a6c57f2
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Wed Apr 3 11:47:58 2013 -0400
User-Agent header is not required when SETTINGS command is used.
Add temporary value until the SETTINGS command populates it.
Bug: 12154framework/ActiveSync/lib/Horde/ActiveSync.php | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/8f52b6b106875d63235f6d06147e897a2a6c57f2
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ ActiveSync: SQL error with HTC Sensation
Type ⇒ Bug
Priority ⇒ 1. Low
I'm just playing around with ActiveSync, a HTC Sensation phone and the
code from git master (HEAD).
This is what I get in the logs when I add the account on the phone:
2013-04-03T14:43:16+02:00 ERR: HORDE [horde] SQL QUERY FAILED:
SQLSTATE[23000]: Integrity constraint violation: 19
horde_activesync_device.device_agent may not be NULL
UPDATE horde_activesync_device SET device_properties =
'a:5:{s:14:"Settings:Model";s:17:"HTCSensationZ710e";s:11:"Settings:OS
";s:13:"Android 4.0.3";s:21:"Settings:FriendlyName";s:19:"HTC
Sensation
Z710e";s:13:"Settings:IMEI";s:16:"************3379";s:20:"Settings:Pho
neNumber";s:13:"Not Available";}', device_agent = NULL
WHERE device_id
= 'HTC6C4153F09B63EAC481259E1F2E139' [pid 474 on line 553
of "/datastore/DEVEL/horde/framework/Db/lib/Horde/Db/Adapter/Base.php"]
The phone seems to sync fine though.
Cheers,
Thomas