Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122597
b: refs/heads/master
c: 863a76e
h: refs/heads/master
i:
  122595: 7bbe24d
v: v3
  • Loading branch information
Hannes Eder authored and David S. Miller committed Dec 13, 2008
1 parent 0b8495a commit dc74b9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb68b1d964f89b19dc13d4f685a7d29616e2a4cb
refs/heads/master: 863a76e5881abe276a55c4490607a960790c5b0b
22 changes: 11 additions & 11 deletions trunk/drivers/isdn/mISDN/l1oip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ l1oip_socket_recv(struct l1oip *hc, u8 remotecodec, u8 channel, u16 timebase,
static void
l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len)
{
u32 id;
u32 packet_id;
u8 channel;
u8 remotecodec;
u16 timebase;
Expand Down Expand Up @@ -508,7 +508,7 @@ l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len)
}

/* get id flag */
id = (*buf>>4)&1;
packet_id = (*buf>>4)&1;

/* check coding */
remotecodec = (*buf) & 0x0f;
Expand All @@ -520,28 +520,28 @@ l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len)
buf++;
len--;

/* check id */
if (id) {
/* check packet_id */
if (packet_id) {
if (!hc->id) {
printk(KERN_WARNING "%s: packet error - packet has id "
"0x%x, but we have not\n", __func__, id);
"0x%x, but we have not\n", __func__, packet_id);
return;
}
if (len < 4) {
printk(KERN_WARNING "%s: packet error - packet too "
"short for ID value\n", __func__);
return;
}
id = (*buf++) << 24;
id += (*buf++) << 16;
id += (*buf++) << 8;
id += (*buf++);
packet_id = (*buf++) << 24;
packet_id += (*buf++) << 16;
packet_id += (*buf++) << 8;
packet_id += (*buf++);
len -= 4;

if (id != hc->id) {
if (packet_id != hc->id) {
printk(KERN_WARNING "%s: packet error - ID mismatch, "
"got 0x%x, we 0x%x\n",
__func__, id, hc->id);
__func__, packet_id, hc->id);
return;
}
} else {
Expand Down

0 comments on commit dc74b9e

Please sign in to comment.