You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7333682
Browse filesBrowse the repository at this point in the historyBrowse files
Capture HEP messages after parsing instead of per recv (#324)
HEP capture fired in each transport's recv hook, on the raw recv
buffer. For a datagram that buffer is a whole message, but on a stream
(TCP/TLS/WS/SCTP) one `recv` returns an arbitrary slice of the byte
stream, so capture emitted byte fragments that did not align with SIP
message boundaries: several HEP packets per message, each starting
mid-message.
Move capture into `tport_deliver()`, which runs once per fully parsed
message, and rebuild the wire image with `msg_iovec()`. The five
per-transport capture calls are removed. Now every transport produces
exactly one HEP packet per SIP message, starting at the request or
status line.
For `msg_iovec()` to reproduce the header bytes the parser must keep
the wire image, so `tport_msg_alloc()` sets `MSG_DO_EXTRACT_COPY` while
the capture socket is open; a `tp_rcaptured` marker dedupes the
per-message delivery, mirroring `tp_rlogged`.
0 commit comments