Fix network UI issue and fix P120829-5114,P120829-5115
[apps/core/preloaded/settings.git] / setting-common / src / setting-common-general-func.c
index 5ea6249..bae736c 100755 (executable)
@@ -29,6 +29,8 @@
 #include <libxml/parser.h>
 #include <system_info.h>
 
+#include <system_settings.h>
+
 char *setting_file_basename(char *path)
 {
        if (NULL == path || '\0' == path[0]) {
@@ -472,15 +474,27 @@ bool is_string_belong_to_array(const char *partern, const char **array,
        return FALSE;
 }
 
+//NULL, "", "  ", "     " etc.. are all empty strings
 bool isEmptyStr(const char *str)
 {
-       if (NULL == str || str[0] == '\0') {
-               return TRUE;
-       } else {
-               return FALSE;
+       //if (NULL == str)
+       //      return TRUE;
+       while (str)
+       {
+               if (*str != '\0' && *str != ' ')
+               {
+                       return FALSE;
+               }
+               else if (*str == '\0')
+               {
+                       return TRUE;
+               }
+               str++;
        }
+       return TRUE;
 }
 
+
 int safeStrCmp(const char *s1, const char *s2)
 {
        /*  Check NULL value first */