widen the name field in database to accommodate longer strings
authorJaska Uimonen <jaska.uimonen@helsinki.fi>
Wed, 17 Dec 2014 17:35:39 +0000 (19:35 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:20 +0000 (18:37 +0200)
Change-Id: I3572824fc00ad0b1cda715d92af4602a2c567d9a

src/plugins/system-controller/resource-manager/audio.c
src/resource/resource-owner.c
src/resource/resource.c

index a4bc224..1721d56 100644 (file)
@@ -171,6 +171,7 @@ static mrp_attr_def_t audio_attrs[] = {
     ATTRIBUTE("role"     , string , "music"      ),
     ATTRIBUTE("pid"      , string , "<unknown>"  ),
     ATTRIBUTE("policy"   , string , "relaxed"    ),
+    ATTRIBUTE("name"     , string , "<unknown>"  ),
     ATTR_END
 };
 
index 647c04a..9269593 100644 (file)
@@ -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;
     }
 
index 25eb865..1c4d632 100644 (file)
@@ -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;
     }