mirror of
https://repo.or.cz/socat.git
synced 2025-07-08 21:36:34 +00:00
Option -R did not only dump right-to-left, but also left-to-right traffic
This commit is contained in:
parent
a390dfc547
commit
1a1cbb1598
3 changed files with 56 additions and 3 deletions
4
socat.c
4
socat.c
|
@ -208,7 +208,7 @@ int main(int argc, const char *argv[]) {
|
|||
O_LARGEFILE|
|
||||
#endif
|
||||
O_NONBLOCK, 0664)) < 0)
|
||||
Error2("option -r \"%s\": %s", a, strerror(errno));
|
||||
Error2("option -R \"%s\": %s", a, strerror(errno));
|
||||
break;
|
||||
case 'b': if (arg1[0][2]) {
|
||||
a = *arg1+2;
|
||||
|
@ -1303,7 +1303,7 @@ int xiotransfer(xiofile_t *inpipe, xiofile_t *outpipe,
|
|||
|
||||
if (!righttoleft && socat_opts.sniffleft >= 0) {
|
||||
Write(socat_opts.sniffleft, buff, bytes);
|
||||
} else if (socat_opts.sniffright >= 0) {
|
||||
} else if (righttoleft && socat_opts.sniffright >= 0) {
|
||||
Write(socat_opts.sniffright, buff, bytes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue