Skip to content

Commit

Permalink
Check if the backend returned multiple IDs (horde@albasoft.com).
Browse files Browse the repository at this point in the history
Bug: 13706

Some backends return multiple server IDs when adding single client IDs, because
they either support adding multiple objects at once, or a single object results
in multiple server-side object. This happens when adding an event with
exceptions for example.

It's still save to only log the first server ID, because we either take care of
only passing a single object at once (case 1) or the parent server object's ID
is returned first.
  • Loading branch information
yunosh committed Nov 21, 2014
1 parent bdb2dcf commit aa85cbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions framework/SyncMl/lib/Horde/SyncMl/Backend/Horde.php
Expand Up @@ -368,6 +368,7 @@ public function addEntry($databaseURI, $content, $contentType, $cuid = null)
$contentType,
Horde_SyncMl_Backend::getParameter($databaseURI, 'source')));

$suid = is_array($suid) ? $suid[0] : $suid;
$this->logMessage(
"Added to server db $database client id $cuid -> server id $suid", 'DEBUG');
$ts = $registry->call(
Expand Down
8 changes: 4 additions & 4 deletions framework/SyncMl/package.xml
Expand Up @@ -11,7 +11,7 @@
<email>jan@horde.org</email>
<active>yes</active>
</lead>
<date>2014-10-21</date>
<date>2014-11-21</date>
<version>
<release>2.0.5</release>
<api>1.0.0</api>
Expand All @@ -22,7 +22,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [jan] Fix creating server-client-mapping if backend returns multiple server IDs per client ID (horde@albasoft.com, Bug #13706).
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -1319,10 +1319,10 @@ Make the SyncML package independant from Horde, provide a new Sql backend as a r
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2014-10-21</date>
<date>2014-11-21</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [jan] Fix creating server-client-mapping if backend returns multiple server IDs per client ID (horde@albasoft.com, Bug #13706).
</notes>
</release>
</changelog>
Expand Down

0 comments on commit aa85cbf

Please sign in to comment.