-// printf("got trau %d %d %d %d %d\n", tf->c_bits[0], tf->c_bits[1], tf->c_bits[2], tf->c_bits[3], tf->c_bits[4]);
- if (tf->c_bits[0]!=0 || tf->c_bits[1]!=0 || tf->c_bits[2]!=0 || tf->c_bits[3]!=1 || tf->c_bits[4]!=0)
- PERROR("illegal trau (C1-C5) %d %d %d %d %d\n", tf->c_bits[0], tf->c_bits[1], tf->c_bits[2], tf->c_bits[3], tf->c_bits[4]);
-
- /* set GSM_MAGIC */
- memset(&frame, 0, sizeof(frame));
-// frame[0] = 0xd << 4;
-
- /* reassemble bits */
- i = 0;
- j = 0;
- k = 0;
- while(i < 260) {
- if (tf->d_bits[i] > 1)
- PERROR("fix!\n");
- frame[j] |= (tf->d_bits[i] << k);
- if (++k == 8) {
- k = 0;
- j++;
- }
- i++;
- }
+ if ((frame->data[0]>>4) != 0xd)
+ PERROR("received GSM frame with wrong magig 0x%x\n", frame->data[0]>>4);