Changeset 1130
- Timestamp:
- 01/08/10 21:56:21 (14 years ago)
- Location:
- branches/monitor-improvement
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/monitor-improvement/oscam-config.c
r1126 r1130 555 555 556 556 #ifdef HAVE_DVBAPI 557 staticvoid chk_t_dvbapi(char *token, char *value)557 void chk_t_dvbapi(char *token, char *value) 558 558 { 559 559 if (!strcmp(token, "enabled")) { cfg->dvbapi_enabled=atoi(value); return; } … … 949 949 dot=","; 950 950 } 951 fputc((int)'\n', f); 951 fputc((int)'\n', f); 952 952 fprintf_conf(f, CONFVARWIDTH, "aulow", "%d\n", cfg->mon_aulow); 953 953 fprintf_conf(f, CONFVARWIDTH, "hideclient_to", "%d\n", cfg->mon_hideclient_to); -
branches/monitor-improvement/oscam-http.c
r1120 r1130 53 53 #endif 54 54 } 55 }56 57 void gettimestring(char *retval, int seconds){58 int secs = 0, fullmins =0, mins =0, hours =0;59 char *tmp="00:00:00";60 61 if(seconds > 0){62 secs = seconds % 60;63 if (seconds > 60){64 fullmins = seconds / 60;65 mins = fullmins % 60;66 if(fullmins > 60) hours = fullmins / 60;67 }68 sprintf(tmp,"%d:%d:%d", hours, mins, secs);69 }70 strncpy(retval,tmp,sizeof(retval)-1);71 55 } 72 56 … … 868 852 tpl_printf(vars, 0, "CLIENTLOGINDATE", "%02d.%02d.%02d", lt->tm_mday, lt->tm_mon+1, lt->tm_year%100); 869 853 tpl_printf(vars, 0, "CLIENTLOGINTIME", "%02d:%02d:%02d", lt->tm_hour, lt->tm_min, lt->tm_sec); 870 tpl_printf(vars, 0, "CLIENTLOGINSECS", "%d", lsec); 854 855 int secs = 0, fullmins =0, mins =0, hours =0; 856 if(lsec > 0){ 857 secs = lsec % 60; 858 if (lsec > 60){ 859 fullmins = lsec / 60; 860 mins = fullmins % 60; 861 if(fullmins > 60) hours = fullmins / 60; 862 } 863 } 864 865 tpl_printf(vars, 0, "CLIENTLOGINSECS", "%02d:%02d:%02d", hours, mins, secs); 871 866 tpl_printf(vars, 0, "CLIENTCAID", "%04X", client[i].last_caid); 872 867 tpl_printf(vars, 0, "CLIENTSRVID", "%04X", client[i].last_srvid); 873 868 tpl_addVar(vars, 0, "CLIENTSRVNAME", monitor_get_srvname(client[i].last_srvid)); 874 tpl_printf(vars, 0, "CLIENTIDLESECS", "%d", isec); 869 870 secs = 0; fullmins =0; mins =0; hours =0; 871 if(isec > 0){ 872 secs = isec % 60; 873 if (isec > 60){ 874 fullmins = isec / 60; 875 mins = fullmins % 60; 876 if(fullmins > 60) hours = fullmins / 60; 877 } 878 } 879 880 tpl_printf(vars, 0, "CLIENTIDLESECS", "%02d:%02d:%02d", hours, mins, secs); 875 881 if(con == 2) tpl_printf(vars, 0, "CLIENTCON", "Duplicate"); 876 882 else if (con == 1) tpl_printf(vars, 0, "CLIENTCON", "Sleep"); -
branches/monitor-improvement/oscam.c
r1126 r1130 1029 1029 case 97: cs_logger(); 1030 1030 #endif 1031 case 98: start_resolver(); 1031 case 98: start_resolver(); 1032 1032 case 95: cs_http(); 1033 1033 } … … 1053 1053 /* Uniq = 1: only one connection per user 1054 1054 * 1055 * Uniq = 2: set (new connected) user only to fake if source 1056 * ip is different (e.g. for newcamd clients with 1055 * Uniq = 2: set (new connected) user only to fake if source 1056 * ip is different (e.g. for newcamd clients with 1057 1057 * different CAID's -> Ports) 1058 1058 * 1059 * Uniq = 3: only one connection per user, but only the last 1059 * Uniq = 3: only one connection per user, but only the last 1060 1060 * login will survive (old mpcs behavior) 1061 1061 */ … … 2283 2283 } 2284 2284 2285 //set time for server to now to avoid 0 in monitor/webif 2286 client[0].last=time((time_t *)0); 2287 2285 2288 start_client_resolver(); 2286 2289 init_service(97); // logger … … 2324 2327 2325 2328 } 2326 2327 2329 2328 2330 #ifdef CS_ANTICASC
Note:
See TracChangeset
for help on using the changeset viewer.