Created
June 2, 2015 23:14
-
-
Save adsr/4871e6b2d4b165fa58aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: ncat/ncat_listen.c | |
| =================================================================== | |
| --- ncat/ncat_listen.c (revision 34570) | |
| +++ ncat/ncat_listen.c (working copy) | |
| @@ -836,7 +836,7 @@ | |
| } | |
| FD_SET(socket_n, &read_fds); | |
| - FD_SET(STDIN_FILENO, &read_fds); | |
| + if (!o.recvonly) FD_SET(STDIN_FILENO, &read_fds); | |
| fdmax = socket_n; | |
| /* stdin -> socket and socket -> stdout */ | |
| @@ -866,18 +866,16 @@ | |
| } | |
| if (o.crlf) | |
| fix_line_endings((char *) buf, &nbytes, &tempbuf, &crlf_state); | |
| - if (!o.recvonly) { | |
| - if (tempbuf != NULL) | |
| - n = send(socket_n, tempbuf, nbytes, 0); | |
| - else | |
| - n = send(socket_n, buf, nbytes, 0); | |
| - if (n < nbytes) { | |
| - loguser("%s.\n", socket_strerror(socket_errno())); | |
| - close(socket_n); | |
| - return 1; | |
| - } | |
| - ncat_log_send(buf, nbytes); | |
| + if (tempbuf != NULL) | |
| + n = send(socket_n, tempbuf, nbytes, 0); | |
| + else | |
| + n = send(socket_n, buf, nbytes, 0); | |
| + if (n < nbytes) { | |
| + loguser("%s.\n", socket_strerror(socket_errno())); | |
| + close(socket_n); | |
| + return 1; | |
| } | |
| + ncat_log_send(buf, nbytes); | |
| if (tempbuf != NULL) { | |
| free(tempbuf); | |
| tempbuf = NULL; | |
| Index: nping/configure | |
| =================================================================== | |
| --- nping/configure (revision 34570) | |
| +++ nping/configure (working copy) | |
| @@ -2229,6 +2229,10 @@ | |
| + | |
| + | |
| + | |
| + | |
| # Check whether --with-localdirs was given. | |
| if test "${with_localdirs+set}" = set; then : | |
| withval=$with_localdirs; case "$with_localdirs" in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment