Updating SecurityOriginInfo fix
authorTomasz Iwanek <t.iwanek@samsung.com>
Mon, 15 Jul 2013 12:45:29 +0000 (14:45 +0200)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 16 Jul 2013 13:06:04 +0000 (13:06 +0000)
[Issue#]       LINUXWRT-657
[Bug]          Update clause missing where statement
[Cause]        N/A
[Solution]     Add where statement
[Verification] Install tct-behaviour widget from TCTManager package. This widget should be able to be installed(reinstalled) several times.
 Run: wrt-installer -i [.wgt] several times in row (Previous version throwed exception from security dao).

Change-Id: I567a34a4442482143750bf3bc3cd86af8de07554

modules/security_origin_dao/dao/security_origin_dao.cpp

index 8f6e3ea..514df6f 100755 (executable)
@@ -228,6 +228,10 @@ void SecurityOriginDAO::setSecurityOriginData(const SecurityOriginData &security
             SECURITY_ORIGIN_DB_UPDATE(update,
                                       SecurityOriginInfo,
                                       &m_securityOriginDBInterface);
+            update->Where(And(And(And(Equals<SecurityOriginInfo::feature>(securityOriginData.feature),
+                                    Equals<SecurityOriginInfo::scheme>(securityOriginData.origin.scheme)),
+                                    Equals<SecurityOriginInfo::host>(securityOriginData.origin.host)),
+                                    Equals<SecurityOriginInfo::port>(securityOriginData.origin.port)));
             update->Values(row);
             update->Execute();
         } else {