Fix parameter checking when setting bucket-pointing policy 95/24795/4
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tue, 22 Jul 2014 06:48:55 +0000 (08:48 +0200)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 22 Jul 2014 09:55:27 +0000 (02:55 -0700)
commitc1f8603272ec4083fbe3f4fb267d1bd7654c7b36
tree6b6b465bcae556babd77b07698e49541071737fb
parent26e7c427a80ab231d15b683d21fec305ef412605
Fix parameter checking when setting bucket-pointing policy

Field result_extra in cynara_admin_policy structure should contain
another bucket's name in case of insertion or update of a policy
pointing to another bucket.

There was no check for that. In case a nullptr was passed, it was
converted to an empty string "".

Now cynara_admin_set_policies
returns CYNARA_ADMIN_API_INVALID_PARAM when
result is set to CYNARA_ADMIN_BUCKET and
result_extra is nullptr.

Change-Id: I24ff5ab662e88b7bc538368385e13d78f48f9e9a
src/admin/api/admin-api.cpp