Subversion Repositories tpanel

Rev

Rev 112 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 112 Rev 113
Line 937... Line 937...
937
 
937
 
938
        if (!access(f.c_str(), R_OK))
938
        if (!access(f.c_str(), R_OK))
939
        {
939
        {
940
            sFileName = f;
940
            sFileName = f;
941
            localSettings.path = *iter;
941
            localSettings.path = *iter;
-
 
942
            found = true;
942
            break;
943
            break;
943
        }
944
        }
944
    }
945
    }
945
 
946
 
946
    // The local configuration file has precedence over the global one.
947
    // The local configuration file has precedence over the global one.
947
    if (HOME)
948
    if (HOME)
948
    {
949
    {
949
        string f = HOME;
950
        string f = HOME;
-
 
951
#ifndef __ANDROID__
950
        f += "/.tpanel.conf";
952
        f += "/.tpanel.conf";
951
 
953
#else
-
 
954
        f += "/tpanel.conf";
-
 
955
#endif
952
        if (!access(f.data(), R_OK))
956
        if (!access(f.data(), R_OK))
953
        {
957
        {
954
            sFileName = f;
958
            sFileName = f;
955
            localSettings.path = HOME;
959
            localSettings.path = HOME;
956
            found = true;
960
            found = true;
Line 1085... Line 1089...
1085
                localSettings.certCheck = isTrue(right);
1089
                localSettings.certCheck = isTrue(right);
1086
            else if (caseCompare(left, "Channel") == 0 && !right.empty())
1090
            else if (caseCompare(left, "Channel") == 0 && !right.empty())
1087
            {
1091
            {
1088
                localSettings.ID = atoi(right.c_str());
1092
                localSettings.ID = atoi(right.c_str());
1089
 
1093
 
1090
                if (localSettings.ID < 10000 || localSettings.ID >= 11000)
1094
                if (localSettings.ID < 10000 || localSettings.ID >= 29000)
1091
                {
1095
                {
1092
                    std::cerr << "TConfig::readConfig: Invalid port number " << right << std::endl;
1096
                    std::cerr << "TConfig::readConfig: Invalid port number " << right << std::endl;
1093
                    localSettings.ID = 0;
1097
                    localSettings.ID = 0;
1094
                }
1098
                }
1095
            }
1099
            }