Changeset 1709
- Timestamp:
- 02/26/10 12:59:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-config.c
r1708 r1709 552 552 553 553 if (token[0] != '#') 554 cs_log( 554 cs_log("Warning: keyword '%s' in anticascading section not recognized",token); 555 555 } 556 556 #endif … … 746 746 747 747 if (token[0] != '#') 748 cs_log( 748 cs_log("Warning: keyword '%s' in camd33 section not recognized",token); 749 749 } 750 750 … … 782 782 783 783 if (token[0] != '#') 784 cs_log( 784 cs_log("Warning: keyword '%s' in camd35 section not recognized", token); 785 785 } 786 786 … … 818 818 819 819 if (token[0] != '#') 820 cs_log( 820 cs_log("Warning: keyword '%s' in camd35 tcp section not recognized", token); 821 821 } 822 822 … … 872 872 873 873 if (token[0] != '#') 874 cs_log( 874 cs_log("Warning: keyword '%s' in newcamd section not recognized", token); 875 875 } 876 876 … … 919 919 920 920 if (token[0] != '#') 921 cs_log( 921 cs_log("Warning: keyword '%s' in cccam section not recognized",token); 922 922 } 923 923 … … 960 960 961 961 if (token[0] != '#') 962 cs_log( 962 cs_log("Warning: keyword '%s' in radegast section not recognized", token); 963 963 } 964 964 … … 974 974 } 975 975 if (token[0] != '#') 976 cs_log( 976 cs_log("Warning: keyword '%s' in serial section not recognized", token); 977 977 } 978 978 … … 980 980 static void chk_t_gbox(char *token, char *value) 981 981 { 982 // if (!strcmp(token, "password")) strncpy(cfg->gbox_pwd, i2b(4, a2i(value, 4)), 4); 983 if (!strcmp(token, "password")) { cs_atob(cfg->gbox_pwd, value, 4); return; } 984 if (!strcmp(token, "maxdist")) { cfg->maxdist=atoi(value); return; } 985 if (!strcmp(token, "ignorelist")) { cs_strncpy((char *)cfg->ignorefile, value, sizeof(cfg->ignorefile)); return; } 986 if (!strcmp(token, "onlineinfos")) { cs_strncpy((char *)cfg->gbxShareOnl, value, sizeof(cfg->gbxShareOnl)); return; } 987 if (!strcmp(token, "cardinfos")) { cs_strncpy((char *)cfg->cardfile, value, sizeof(cfg->cardfile)); return; } 988 if (!strcmp(token, "locals")) 989 { 990 char *ptr1; 991 int n=0, i; 992 for (i=0, ptr1=strtok(value, ","); (i<CS_MAXLOCALS) && (ptr1); ptr1=strtok(NULL, ",")) 993 { 994 cfg->locals[n++]=a2i(ptr1, 8); 995 //printf("%i %08X",n,cfg->locals[n-1]); 996 } 997 cfg->num_locals=n; 998 return; 999 } 1000 if (token[0] != '#') 1001 fprintf(stderr, "Warning: keyword '%s' in gbox section not recognized\n",token); 982 //if (!strcmp(token, "password")) strncpy(cfg->gbox_pwd, i2b(4, a2i(value, 4)), 4); 983 if (!strcmp(token, "password")) { 984 cs_atob(cfg->gbox_pwd, value, 4); 985 return; 986 } 987 988 if (!strcmp(token, "maxdist")) { 989 cfg->maxdist=atoi(value); 990 return; 991 } 992 993 if (!strcmp(token, "ignorelist")) { 994 cs_strncpy((char *)cfg->ignorefile, value, sizeof(cfg->ignorefile)); 995 return; 996 } 997 998 if (!strcmp(token, "onlineinfos")) { 999 cs_strncpy((char *)cfg->gbxShareOnl, value, sizeof(cfg->gbxShareOnl)); 1000 return; 1001 } 1002 1003 if (!strcmp(token, "cardinfos")) { 1004 cs_strncpy((char *)cfg->cardfile, value, sizeof(cfg->cardfile)); 1005 return; 1006 } 1007 1008 if (!strcmp(token, "locals")) 1009 { 1010 char *ptr1; 1011 int n = 0, i; 1012 for (i = 0, ptr1 = strtok(value, ","); (i < CS_MAXLOCALS) && (ptr1); ptr1 = strtok(NULL, ",")) { 1013 cfg->locals[n++] = a2i(ptr1, 8); 1014 //printf("%i %08X",n,cfg->locals[n-1]); 1015 } 1016 cfg->num_locals = n; 1017 return; 1018 } 1019 1020 if (token[0] != '#') 1021 cs_log("Warning: keyword '%s' in gbox section not recognized",token); 1002 1022 } 1003 1023 #endif … … 1006 1026 void chk_t_dvbapi(char *token, char *value) 1007 1027 { 1008 if (!strcmp(token, "enabled")) { cfg->dvbapi_enabled=atoi(value); return; } 1009 if (!strcmp(token, "au")) { cfg->dvbapi_au=atoi(value); return; } 1010 if (!strcmp(token, "boxtype")) { cs_strncpy(cfg->dvbapi_boxtype, value, sizeof(cfg->dvbapi_boxtype)); return; } 1011 if (!strcmp(token, "user")) { cs_strncpy(cfg->dvbapi_usr, value, sizeof(cfg->dvbapi_usr)); return; } 1012 if (!strcmp(token, "priority")) { cs_strncpy(cfg->dvbapi_priority, value, sizeof(cfg->dvbapi_priority)); return; } 1013 if (!strcmp(token, "ignore")) { cs_strncpy(cfg->dvbapi_ignore, value, sizeof(cfg->dvbapi_ignore)); return; } 1028 if (!strcmp(token, "enabled")) { 1029 cfg->dvbapi_enabled = atoi(value); 1030 return; 1031 } 1032 1033 if (!strcmp(token, "au")) { 1034 cfg->dvbapi_au = atoi(value); 1035 return; 1036 } 1037 1038 if (!strcmp(token, "boxtype")) { 1039 cs_strncpy(cfg->dvbapi_boxtype, value, sizeof(cfg->dvbapi_boxtype)); 1040 return; 1041 } 1042 1043 if (!strcmp(token, "user")) { 1044 cs_strncpy(cfg->dvbapi_usr, value, sizeof(cfg->dvbapi_usr)); 1045 return; 1046 } 1047 1048 if (!strcmp(token, "priority")) { 1049 cs_strncpy(cfg->dvbapi_priority, value, sizeof(cfg->dvbapi_priority)); 1050 return; 1051 } 1052 1053 if (!strcmp(token, "ignore")) { 1054 cs_strncpy(cfg->dvbapi_ignore, value, sizeof(cfg->dvbapi_ignore)); 1055 return; 1056 } 1014 1057 1015 1058 if (token[0] != '#') 1016 fprintf(stderr,"Warning: keyword '%s' in dvbapi section not recognized\n",token);1059 cs_log("Warning: keyword '%s' in dvbapi section not recognized\n",token); 1017 1060 } 1018 1061 #endif … … 1030 1073 case TAG_SERIAL : chk_t_serial(token, value); break; 1031 1074 case TAG_CS378X : chk_t_camd35_tcp(token, value); break; 1075 case TAG_CCCAM : chk_t_cccam(token, value); break; 1032 1076 1033 1077 #ifdef CS_WITH_GBOX 1034 1078 case TAG_GBOX : chk_t_gbox(token, value); break; 1035 1079 #else 1036 case TAG_GBOX : fprintf(stderr, "Warning: OSCam compiled without gbox support.\n"); break;1037 #endif 1038 1039 case TAG_CCCAM : chk_t_cccam(token, value); break; 1080 case TAG_GBOX : cs_log("Warning: OSCam compiled without gbox support."); break; 1081 #endif 1082 1083 1040 1084 #ifdef HAVE_DVBAPI 1041 1085 case TAG_DVBAPI : chk_t_dvbapi(token, value); break; 1042 1086 #else 1043 case TAG_DVBAPI : fprintf(stderr, "Warning: OSCam compiled without DVB API support.\n"); break;1087 case TAG_DVBAPI : cs_log("Warning: OSCam compiled without DVB API support."); break; 1044 1088 #endif 1045 1089 1046 1090 1047 1091 #ifdef WEBIF 1048 case TAG_WEBIF : chk_t_webif(token, value); break;1092 case TAG_WEBIF : chk_t_webif(token, value); break; 1049 1093 #else 1050 case TAG_WEBIF : fprintf(stderr, "Warning: OSCam compiled without Webinterface support.\n"); break;1094 case TAG_WEBIF : cs_log("Warning: OSCam compiled without Webinterface support."); break; 1051 1095 #endif 1052 1096 … … 1055 1099 case TAG_ANTICASC: chk_t_ac(token, value); break; 1056 1100 #else 1057 case TAG_ANTICASC: fprintf(stderr, "Warning: OSCam compiled without anticascading support.\n"); break;1101 case TAG_ANTICASC: cs_log("Warning: OSCam compiled without anticascading support."); break; 1058 1102 #endif 1059 1103 … … 1407 1451 1408 1452 if (token[0] != '#') 1409 cs_log( 1453 cs_log("Warning: keyword '%s' in account section not recognized",token); 1410 1454 } 1411 1455 … … 1937 1981 if (!strcmp(token, "srvid")) { chk_entry4sidtab(value, sidtab, 2); return; } 1938 1982 if (token[0] != '#') 1939 fprintf(stderr, "Warning: keyword '%s' in sidtab section not recognized\n",token);1983 cs_log("Warning: keyword '%s' in sidtab section not recognized",token); 1940 1984 } 1941 1985 … … 2413 2457 } 2414 2458 2415 cs_log( 2459 cs_log("WARNING: value '%s' in protocol-line not recognized, assuming MOUSE",value); 2416 2460 rdr->typ = R_MOUSE; 2417 2461 return;
Note:
See TracChangeset
for help on using the changeset viewer.