summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/bluetooth/socket
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2002-12-19 22:58:27 +0000
committerbmilekic <bmilekic@FreeBSD.org>2002-12-19 22:58:27 +0000
commit514c635ee6d3ff47b542ec91a037e7a241c1357c (patch)
treefb78678839efbdec9c58873ff5e7df1cf42aa7f5 /sys/netgraph/bluetooth/socket
parent13bc2a4ca63803cb5287e5acd86ed9b2e3238689 (diff)
downloadFreeBSD-src-514c635ee6d3ff47b542ec91a037e7a241c1357c.zip
FreeBSD-src-514c635ee6d3ff47b542ec91a037e7a241c1357c.tar.gz
o Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} and
the mbuf allocator flags {M_TRYWAIT, M_DONTWAIT}. o Fix a bpf_compat issue where malloc() was defined to just call bpf_alloc() and pass the 'canwait' flag(s) along. It's been changed to call bpf_alloc() but pass the corresponding M_TRYWAIT or M_DONTWAIT flag (and only one of those two). Submitted by: Hiten Pandya <hiten@unixdaemons.com> (hiten->commit_count++)
Diffstat (limited to 'sys/netgraph/bluetooth/socket')
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c2
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
index 69fcbf0..8fa8a08 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
@@ -1271,7 +1271,7 @@ ng_btsocket_hci_raw_send(struct socket *so, int flags, struct mbuf *m,
sa = (struct sockaddr *) &pcb->addr;
}
- MGET(nam, M_WAITOK, MT_SONAME);
+ MGET(nam, M_TRYWAIT, MT_SONAME);
if (nam == NULL) {
error = ENOBUFS;
goto drop;
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
index 8360038..dec7a3c 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
@@ -1464,7 +1464,7 @@ ng_btsocket_l2cap_data_input(struct mbuf *m, hook_p hook)
* it is a broadcast traffic after all
*/
- copy = m_dup(m, M_NOWAIT);
+ copy = m_dup(m, M_DONTWAIT);
if (copy != NULL) {
sbappendrecord(&pcb->so->so_rcv, copy);
sorwakeup(pcb->so);
@@ -2384,7 +2384,7 @@ ng_btsocket_l2cap_send2(ng_btsocket_l2cap_pcb_p pcb)
if (pcb->so->so_snd.sb_cc == 0)
return (EINVAL); /* XXX */
- m = m_dup(pcb->so->so_snd.sb_mb, M_NOWAIT);
+ m = m_dup(pcb->so->so_snd.sb_mb, M_DONTWAIT);
if (m == NULL)
return (ENOBUFS);
OpenPOWER on IntegriCloud