- Timestamp:
- 07/31/11 23:13:59 (13 years ago)
- Location:
- tags/1.10
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/1.10/module-datastruct-llist.c
r5702 r5755 148 148 { 149 149 if (l && obj) { 150 if (!ll_lock(l)) return NULL; 151 150 152 151 LL_NODE *new; 153 152 if(!cs_malloc(&new,sizeof(LL_NODE), -1)) return NULL; 154 153 if (!ll_lock(l)) { add_garbage(new); return NULL; } 155 154 new->obj = obj; 156 155 new->nxt = l->initial; … … 244 243 else { 245 244 LL_NODE *n; 246 if(!cs_malloc(&n,sizeof(LL_NODE), -1)) return; 247 245 if(!cs_malloc(&n,sizeof(LL_NODE), -1)) { ll_unlock(it->l); return; } 248 246 n->obj = obj; 249 247 n->nxt = it->cur->nxt; -
tags/1.10/reader-videoguard2.c
r5556 r5755 637 637 638 638 // process cw2 639 int32_t ind; 640 for(ind=15; ind<l+5-10; ind++) { // +5 for 5 ins bytes, -10 to prevent memcpy ind+3,8 from reading past 641 // rxbuffer we start searching at 15 because start at 13 goes wrong 642 // with 090F 090b and 096a 643 if(rbuff[ind]==0x25 && rbuff[ind+1] == 0x11) { 644 memcpy(er->cw+8,rbuff+ind+3,8); //tested on viasat 093E, sky uk 0963, sky it 919 645 //don't care whether cw is 0 or not 646 break; 639 unsigned char *payload = rbuff+5; 640 int payloadLen = rbuff[4]; 641 int ind=8+6; // +8 for CW1, +6 for counter(?) 642 643 while(ind<payloadLen) { 644 switch(payload[ind]) 645 { 646 case 0x25: // CW2 647 //cs_dump (payload + ind, payload[ind+1]+2, "INS54 - CW2"); 648 memcpy(er->cw+8,&payload[ind+3],8); 649 ind += payload[ind+1]+2; 650 break; 651 652 default: 653 //cs_dump (payload + ind, payload[ind+1]+2, "INS54"); 654 ind += payload[ind+1]+2; 655 break; 647 656 } 648 657 }
Note:
See TracChangeset
for help on using the changeset viewer.