diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2010-07-02 02:40:18 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2010-07-02 02:40:18 +0000 |
commit | bfc9493d9280a5a8ab43b8df30cd772c910140ba (patch) | |
tree | 32334a91bf10c89a8551f90fe6749d45476d9ad8 /sys/netbt/l2cap_signal.c | |
parent | 364840df3893a5f720df05ee307b996c62195a07 (diff) |
m_copyback can fail to allocate memory, but is a void fucntion so gymnastics
are required to detect that.
Change the function to take a wait argument (used in nfs server, but
M_NOWAIT everywhere else for now) and to return an error
ok claudio@ henning@ krw@
Diffstat (limited to 'sys/netbt/l2cap_signal.c')
-rw-r--r-- | sys/netbt/l2cap_signal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netbt/l2cap_signal.c b/sys/netbt/l2cap_signal.c index a10706728ae..5d4f0dc6da5 100644 --- a/sys/netbt/l2cap_signal.c +++ b/sys/netbt/l2cap_signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: l2cap_signal.c,v 1.5 2009/01/14 08:10:05 grange Exp $ */ +/* $OpenBSD: l2cap_signal.c,v 1.6 2010/07/02 02:40:16 blambert Exp $ */ /* $NetBSD: l2cap_signal.c,v 1.9 2007/11/10 23:12:23 plunky Exp $ */ /*- @@ -959,7 +959,8 @@ l2cap_send_signal(struct hci_link *link, uint8_t code, uint8_t ident, /* Command Data */ if (length > 0) - m_copyback(m, sizeof(*hdr) + sizeof(*cmd), length, data); + m_copyback(m, sizeof(*hdr) + sizeof(*cmd), length, data, + M_NOWAIT); /* Command Header */ cmd->code = code; |