From: Jaska Uimonen Date: Wed, 17 Dec 2014 17:35:39 +0000 (+0200) Subject: widen the name field in database to accommodate longer strings X-Git-Tag: accepted/tizen/ivi/20150112.012920~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=227d4c6269dd8f16f5bf0b57ede699c93117d69a;p=profile%2Fivi%2Fmurphy.git widen the name field in database to accommodate longer strings Change-Id: I3572824fc00ad0b1cda715d92af4602a2c567d9a --- diff --git a/src/plugins/system-controller/resource-manager/audio.c b/src/plugins/system-controller/resource-manager/audio.c index a4bc224..1721d56 100644 --- a/src/plugins/system-controller/resource-manager/audio.c +++ b/src/plugins/system-controller/resource-manager/audio.c @@ -171,6 +171,7 @@ static mrp_attr_def_t audio_attrs[] = { ATTRIBUTE("role" , string , "music" ), ATTRIBUTE("pid" , string , "" ), ATTRIBUTE("policy" , string , "relaxed" ), + ATTRIBUTE("name" , string , "" ), ATTR_END }; diff --git a/src/resource/resource-owner.c b/src/resource/resource-owner.c index 647c04a..9269593 100644 --- a/src/resource/resource-owner.c +++ b/src/resource/resource-owner.c @@ -51,6 +51,7 @@ #include "resource-lua.h" #define NAME_LENGTH 24 +#define ATTR_LENGTH 64 #define ZONE_ID_IDX 0 #define ZONE_NAME_IDX 1 @@ -140,7 +141,7 @@ int mrp_resource_owner_create_database_table(mrp_resource_def_t *rdef) col->name = atd->name; col->type = atd->type; - col->length = (col->type == mqi_string) ? NAME_LENGTH : 0; + col->length = (col->type == mqi_string) ? ATTR_LENGTH : 0; col->flags = 0; } diff --git a/src/resource/resource.c b/src/resource/resource.c index 25eb865..1c4d632 100644 --- a/src/resource/resource.c +++ b/src/resource/resource.c @@ -50,6 +50,7 @@ #define RESOURCE_MAX (sizeof(mrp_resource_mask_t) * 8) #define ATTRIBUTE_MAX (sizeof(mrp_attribute_mask_t) * 8) #define NAME_LENGTH 24 +#define ATTR_LENGTH 64 #define RSETID_IDX 0 #define AUTOREL_IDX 1 @@ -695,7 +696,7 @@ static int resource_user_create_table(mrp_resource_def_t *rdef) col->name = atd->name; col->type = atd->type; - col->length = (col->type == mqi_string) ? NAME_LENGTH : 0; + col->length = (col->type == mqi_string) ? ATTR_LENGTH : 0; col->flags = 0; }