diff options
author | glebius <glebius@FreeBSD.org> | 2006-08-08 07:04:40 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2006-08-08 07:04:40 +0000 |
commit | 03ea83713a04822f35c71433aa9f1886fa29efc5 (patch) | |
tree | 58b7a8cda0097b1f195de1137b6e581f5e9f5b32 /usr.sbin/ngctl | |
parent | 45c95873a52350b9c9fd983fcb22706a6caf9c4b (diff) | |
download | FreeBSD-src-03ea83713a04822f35c71433aa9f1886fa29efc5.zip FreeBSD-src-03ea83713a04822f35c71433aa9f1886fa29efc5.tar.gz |
- Pass pointer to fd_set in ReadSockets.
- style(9) nits.
Submitted by: ru
Diffstat (limited to 'usr.sbin/ngctl')
-rw-r--r-- | usr.sbin/ngctl/main.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.sbin/ngctl/main.c b/usr.sbin/ngctl/main.c index 5a11899..e4ba0b7 100644 --- a/usr.sbin/ngctl/main.c +++ b/usr.sbin/ngctl/main.c @@ -68,7 +68,7 @@ /* Internal functions */ static int ReadFile(FILE *fp); -static void ReadSockets(fd_set); +static void ReadSockets(fd_set *); static int DoParseCommand(char *line); static int DoCommand(int ac, char **av); static int DoInteractive(void); @@ -227,6 +227,7 @@ ReadFile(FILE *fp) static void Unblock(int signal) { + unblock = 1; } @@ -262,8 +263,7 @@ Monitor(void *v) } err(EX_OSERR, "select"); } - - ReadSockets(rfds); + ReadSockets(&rfds); } return (NULL); @@ -272,7 +272,8 @@ Monitor(void *v) static char * Prompt(EditLine *el) { - return PROMPT; + + return (PROMPT); } /* @@ -371,7 +372,7 @@ DoInteractive(void) printf("\n"); } - ReadSockets(rfds); + ReadSockets(&rfds); /* Get any user input */ if (FD_ISSET(0, &rfds)) { @@ -393,14 +394,14 @@ DoInteractive(void) * Read and process data on netgraph control and data sockets. */ static void -ReadSockets(fd_set rfds) +ReadSockets(fd_set *rfds) { /* Display any incoming control message. */ - if (FD_ISSET(csock, &rfds)) + if (FD_ISSET(csock, rfds)) MsgRead(); /* Display any incoming data packet. */ - if (FD_ISSET(dsock, &rfds)) { + if (FD_ISSET(dsock, rfds)) { char hook[NG_HOOKSIZ]; u_char *buf; int rl; |