Changeset 1526
- Timestamp:
- 02/12/10 14:37:54 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam.c
r1521 r1526 1063 1063 * Uniq = 3: only one connection per user, but only the last 1064 1064 * login will survive (old mpcs behavior) 1065 * 1066 * Uniq = 4: set user only to fake if source ip is 1067 * different, but only the last login will survive 1065 1068 */ 1066 1069 1067 int i; 1068 1069 for (i=cdiff+1; i<CS_MAXPID; i++) { 1070 if (client[i].pid 1071 && (client[i].typ == 'c') 1072 && !client[i].dup 1073 && !strcmp(client[i].usr, usr) 1074 && ((uniq != 2) || (client[i].ip != ip))) 1075 { 1076 if (uniq == 3) 1077 { 1078 client[i].dup = 1; 1079 client[i].au = -1; 1080 cs_log("client(%d) duplicate user '%s' from %s set to fake (uniq=%d)", i-cdiff, usr, cs_inet_ntoa(ip), uniq); 1081 } 1082 else 1083 { 1084 client[cs_idx].dup = 1; 1085 client[cs_idx].au = -1; 1086 cs_log("client(%d) duplicate user '%s' from %s set to fake (uniq=%d)", cs_idx-cdiff, usr, cs_inet_ntoa(ip), uniq); 1087 break; 1088 } 1089 } 1090 } 1070 int i; 1071 for (i=cdiff+1; i<CS_MAXPID; i++) 1072 { 1073 if (client[i].pid && (client[i].typ == 'c') && !client[i].dup && !strcmp(client[i].usr, usr) 1074 && (uniq < 5) && ((uniq % 2) || (client[i].ip != ip))) 1075 { 1076 if (uniq == 3 || uniq == 4) 1077 { 1078 client[i].dup = 1; 1079 client[i].au = -1; 1080 cs_log("client(%d) duplicate user '%s' from %s set to fake (uniq=%d)", i-cdiff, usr, cs_inet_ntoa(ip), uniq); 1081 } 1082 else 1083 { 1084 client[cs_idx].dup = 1; 1085 client[cs_idx].au = -1; 1086 cs_log("client(%d) duplicate user '%s' from %s set to fake (uniq=%d)", cs_idx-cdiff, usr, cs_inet_ntoa(ip), uniq); 1087 break; 1088 } 1089 1090 } 1091 } 1092 1091 1093 } 1092 1094 … … 1605 1607 case 3: 1606 1608 // 0 - found 1607 // 3 - emu FIXME: (obsolete ?)1609 // 3 - emu FIXME: obsolete ? 1608 1610 client[cs_idx].cwfound++; 1609 1611 break; … … 1630 1632 break; 1631 1633 1632 case 6: 1633 case 7: 1634 case 8: 1635 case 11: 1636 case 12: 1637 // 6 - sleeping 1638 // 7 - fake 1639 // 8 - invalid 1640 // 11 - expired 1641 // 12 - disabled 1634 default: 1642 1635 client[cs_idx].cwignored++; 1643 break;1644 1645 default:1646 if (er->rcEx)1647 client[cs_idx].cwignored++;1648 else1649 client[cs_idx].cwnot++;1650 1636 } 1651 1637 #ifdef CS_ANTICASC
Note:
See TracChangeset
for help on using the changeset viewer.