* As above, except the mbuf chain begins a new record. */
| 1100 | * As above, except the mbuf chain begins a new record. |
| 1101 | */ |
| 1102 | void |
| 1103 | sbappendrecord_locked(struct sockbuf *sb, struct mbuf *m0) |
| 1104 | { |
| 1105 | struct mbuf *m; |
| 1106 | |
| 1107 | SOCKBUF_LOCK_ASSERT(sb); |
| 1108 | |
| 1109 | if (m0 == NULL) |
| 1110 | return; |
| 1111 | m_clrprotoflags(m0); |
| 1112 | /* |
| 1113 | * Put the first mbuf on the queue. Note this permits zero length |
| 1114 | * records. |
| 1115 | */ |
| 1116 | sballoc(sb, m0); |
| 1117 | SBLASTRECORDCHK(sb); |
| 1118 | SBLINKRECORD(sb, m0); |
| 1119 | sb->sb_mbtail = m0; |
| 1120 | m = m0->m_next; |
| 1121 | m0->m_next = 0; |
| 1122 | if (m && (m0->m_flags & M_EOR)) { |
| 1123 | m0->m_flags &= ~M_EOR; |
| 1124 | m->m_flags |= M_EOR; |
| 1125 | } |
| 1126 | /* always call sbcompress() so it can do SBLASTMBUFCHK() */ |
| 1127 | sbcompress(sb, m, m0); |
| 1128 | } |
| 1129 | |
| 1130 | /* |
| 1131 | * As above, except the mbuf chain begins a new record. |
no test coverage detected