Fix logging in app_add_permissions_internal()
authorRafal Krypa <r.krypa@samsung.com>
Wed, 27 Mar 2013 18:26:11 +0000 (19:26 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Tue, 16 Apr 2013 12:55:00 +0000 (14:55 +0200)
[Issue#]       N/A
[Feature]      Get some log before execution of code the log is about.
[Cause]        N/A
[Solution]     N/A
[Verification] N/A

Change-Id: If38b11f0c35b8b5345a14a3e454b46dc5cfc4b3c

src/privilege-control.c

index ad8d603..6188878 100644 (file)
@@ -682,8 +682,8 @@ static int app_add_permissions_internal(const char* app_id, app_type_t app_type,
        }
 
        for (i = 0; perm_list[i] != NULL; ++i) {
-               ret = perm_to_smack(smack, app_id, app_type, perm_list[i]);
                C_LOGD("perm_to_smack params: app_id: %s, perm_list[%d]: %s", app_id, i, perm_list[i]);
+               ret = perm_to_smack(smack, app_id, app_type, perm_list[i]);
                if (ret != PC_OPERATION_SUCCESS){
                        C_LOGE("perm_to_smack failed");
                        goto out;