Changeset 8364
- Timestamp:
- 02/18/13 02:52:43 (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/globals.h
r8361 r8364 983 983 uint8_t gbox_peer_id[2]; 984 984 uint8_t gbox_ver; 985 int8_t gbox_ctyp;986 985 #endif 987 986 -
trunk/module-gbox.c
r8362 r8364 165 165 struct s_client *cl; 166 166 for (i = 0, cl = first_client; cl; cl = cl->next, i++) { 167 if ( cl->ctyp==6) {167 if (get_module(cl)->num == R_GBOX) { 168 168 struct s_reader *rdr = cl->reader; 169 169 struct gbox_data *gbox = cl->gbox; … … 179 179 } // end of while ll_iter_next 180 180 } // end of if INSERTED && 'p' 181 } // end of if ctyp=6181 } 182 182 } // end of for cl->next 183 183 fclose(fhandle); … … 268 268 struct s_client *cl; 269 269 for (cl = first_client; cl; cl = cl->next) { 270 if ( cl->ctyp == 6) {270 if (get_module(cl)->num == R_GBOX) { 271 271 hostname2ip(cl->reader->device, &SIN_GET_ADDR(cl->udp_sa)); 272 272 SIN_GET_FAMILY(cl->udp_sa) = AF_INET; … … 445 445 gbox->hello_expired++; 446 446 gbox->peer.hello_cont=1; 447 cli->ctyp = 6;448 447 gbox->peer.online = 1; 449 448 … … 529 528 gbox->peer.t_ecm = time((time_t*)0); 530 529 531 cli->ctyp = 6;532 530 ECM_REQUEST *er; 533 531 if (!(er=get_ecmtask())) break; … … 578 576 memcpy(ei->checksums, ecm + er->ecmlen + 14, 14); 579 577 er->gbox_crc = gbox_get_ecmchecksum(er); 580 cli->gbox_ctyp=6;581 578 582 579 gbox->peer.t_ecm = time((time_t*)0); … … 654 651 655 652 if (IP_EQUAL(recv_ip, cli->ip) 656 && cli->ctyp == 6&& recv_port == cli->reader->l_port) {653 && get_module(cli)->num == R_GBOX && recv_port == cli->reader->l_port) { 657 654 658 655 verify_peer_ip = 1; … … 1156 1153 } 1157 1154 // if rdr = gbox, reshare card 1158 if ( cl->ctyp == 6) {1155 if (get_module(cl)->num == R_GBOX) { 1159 1156 struct gbox_data *gbox_1 = cl->gbox; 1160 1157 struct gbox_card *card_g; … … 1470 1467 cli->reader->card_status = CARD_NEED_INIT; 1471 1468 gbox_send_hello(cli); 1472 cli->ctyp = 6;1473 1469 1474 1470 if (!cli->reader->gbox_maxecmsend)
Note:
See TracChangeset
for help on using the changeset viewer.