FS-9328 #resolve [switch_jb_peek_frame uses wrong len]
This commit is contained in:
parent
3a3f456e88
commit
8c6b2657bf
|
@ -902,10 +902,10 @@ SWITCH_DECLARE(switch_status_t) switch_jb_peek_frame(switch_jb_t *jb, uint32_t t
|
||||||
frame->seq = ntohs(node->packet.header.seq);
|
frame->seq = ntohs(node->packet.header.seq);
|
||||||
frame->timestamp = ntohl(node->packet.header.ts);
|
frame->timestamp = ntohl(node->packet.header.ts);
|
||||||
frame->m = node->packet.header.m;
|
frame->m = node->packet.header.m;
|
||||||
frame->datalen = node->len;
|
frame->datalen = node->len - 12;
|
||||||
|
|
||||||
if (frame->data && frame->buflen > node->len) {
|
if (frame->data && frame->buflen > node->len - 12) {
|
||||||
memcpy(frame->data, node->packet.body, node->len);
|
memcpy(frame->data, node->packet.body, node->len - 12);
|
||||||
}
|
}
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue