diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2006-01-21 10:04:40 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2006-01-21 10:04:40 +0000 |
commit | 3da024bf9927b7f6477f3cf9da6bce0828391c6c (patch) | |
tree | deeddd554756fa1b962e0558766916ce35eb1189 /lib | |
parent | e7800ff04968a60cdb8782ecf6d44c5d064d0303 (diff) |
Notes
Diffstat (limited to 'lib')
-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 cca957325ab2d..8b4ca06a71663 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 */ |