diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2006-01-12 19:14:40 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2006-01-12 19:14:40 +0000 |
commit | 2df050ad10cde5237970359fd21baf0c0d33b83c (patch) | |
tree | b2c0019bd35fabc0a5c9e34912a888b49f88722b /lib/libnetgraph | |
parent | 352219015d3c772c1f6189c5f9168aaa312c1281 (diff) | |
download | src-2df050ad10cde5237970359fd21baf0c0d33b83c.tar.gz src-2df050ad10cde5237970359fd21baf0c0d33b83c.zip |
Notes
Diffstat (limited to 'lib/libnetgraph')
-rw-r--r-- | lib/libnetgraph/msg.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/libnetgraph/msg.c b/lib/libnetgraph/msg.c index cca957325ab2..8b4ca06a7166 100644 --- a/lib/libnetgraph/msg.c +++ b/lib/libnetgraph/msg.c @@ -232,6 +232,22 @@ NgDeliverMsg(int cs, const char *path, goto done; } + /* Wait for reply if there should be one. */ + if (msg->header.cmd & NGM_HASREPLY) { + fd_set rfds; + int n; + + FD_ZERO(&rfds); + FD_SET(cs, &rfds); + n = select(cs + 1, &rfds, NULL, NULL, NULL); + if (n == -1) { + errnosv = errno; + if (_gNgDebugLevel >= 1) + NGLOG("select"); + rtn = -1; + } + } + done: /* Done */ free(buf); /* OK if buf is NULL */ |