Arrange common str_pattern to fit in PATTERN_MAX 26/94426/1 accepted/tizen/common/20161031.121827 accepted/tizen/ivi/20161031.082443 accepted/tizen/mobile/20161031.082410 accepted/tizen/tv/20161031.082414 accepted/tizen/wearable/20161031.082424 submit/tizen/20161031.030614
authorpr.jung <pr.jung@samsung.com>
Mon, 31 Oct 2016 01:52:03 +0000 (10:52 +0900)
committerpr.jung <pr.jung@samsung.com>
Mon, 31 Oct 2016 01:52:03 +0000 (10:52 +0900)
If str_pattern is null, skip configuration parsing

Change-Id: Iaafd617da70bebfc09417b8359ade6079ea3fa86
Signed-off-by: pr.jung <pr.jung@samsung.com>
common/src/check.c
src/parser.c

index eb3936f..f17e825 100644 (file)
@@ -97,6 +97,16 @@ static const char *common_str_pattern[] = {
        "FEEDBACK_PATTERN_LIST_REORDER",
        "FEEDBACK_PATTERN_LIST_SLIDER",
        "FEEDBACK_PATTERN_VOLUME_KEY",
+
+       "",
+       "",
+       "",
+       "",
+       "",
+       "",
+       "",
+       "",
+       "",
 };
 
 static bool common_get_always_alert_case(int type, int pattern)
index 9dc4c66..3bde6a6 100644 (file)
@@ -157,6 +157,8 @@ static int load_config(struct parse_result *result, void *user_data)
        value = result->value;
 
        for (i = 0; i < profile->max_pattern; i++) {
+               if (!profile->str_pattern[i])
+                       continue;
                if (!MATCH(name, (char *)profile->str_pattern[i]))
                        continue;