Changeset 5190 for trunk/module-cccam.c
- Timestamp:
- 05/07/11 11:26:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-cccam.c
r5189 r5190 17 17 static uint8_t cc_node_id[8]; 18 18 19 #define getprefix() ( (struct cc_data *)(cl->cc))->prefix19 #define getprefix() (!cl?"":(!cl->cc?"":(((struct cc_data *)(cl->cc))->prefix))) 20 20 21 21 void cc_init_crypt(struct cc_crypt_block *block, uint8_t *key, int32_t len) { … … 2656 2656 char usr[21], pwd[65]; 2657 2657 struct s_auth *account; 2658 struct cc_data *cc = cl->cc;2658 struct cc_data *cc; 2659 2659 2660 2660 memset(usr, 0, sizeof(usr)); 2661 2661 memset(pwd, 0, sizeof(pwd)); 2662 2662 2663 //SS: Use last cc data for faster reconnects: 2664 if (!cc) { 2665 // init internals data struct 2666 cc = cs_malloc(&cc, sizeof(struct cc_data), QUITERROR); 2667 cl->cc = cc; 2668 memset(cl->cc, 0, sizeof(struct cc_data)); 2669 cc->extended_ecm_idx = ll_create(); 2670 2671 cc_init_cc(cc); 2672 } 2663 // init internals data struct 2664 cc = cs_malloc(&cc, sizeof(struct cc_data), QUITERROR); 2665 cl->cc = cc; 2666 memset(cl->cc, 0, sizeof(struct cc_data)); 2667 cc->extended_ecm_idx = ll_create(); 2668 2669 cc_init_cc(cc); 2673 2670 uint8_t *buf = cc->send_buffer; 2674 2671 … … 2794 2791 cs_debug_mask(D_TRACE, "ccc user authenticated %s", usr); 2795 2792 2796 if (!cc->prefix) { 2797 cc->prefix = cs_malloc(&cc->prefix, strlen(cl->account->usr)+20, QUITERROR); 2798 snprintf(cc->prefix, strlen(cl->account->usr)+20, "cccam(s) %s: ", cl->account->usr); 2799 } 2800 2793 cc->prefix = cs_malloc(&cc->prefix, strlen(cl->account->usr)+20, QUITERROR); 2794 snprintf(cc->prefix, strlen(cl->account->usr)+20, "cccam(s) %s: ", cl->account->usr); 2801 2795 2802 2796 //Starting readers to get cards:
Note:
See TracChangeset
for help on using the changeset viewer.