X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/9cda68ab3974b1f2c08a5896929890bf4a973e9a..c9cb7c0c2f698be97ddafd7575a3859aed9cb518:/proxy/tripe-mitm.c diff --git a/proxy/tripe-mitm.c b/proxy/tripe-mitm.c index eb1c7fd2..74739539 100644 --- a/proxy/tripe-mitm.c +++ b/proxy/tripe-mitm.c @@ -9,19 +9,18 @@ * * This file is part of Trivial IP Encryption (TrIPE). * - * TrIPE is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * TrIPE is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your + * option) any later version. * - * TrIPE is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * TrIPE is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. * * You should have received a copy of the GNU General Public License - * along with TrIPE; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with TrIPE. If not, see . */ /*----- Header files ------------------------------------------------------*/ @@ -439,7 +438,7 @@ static void adddelay(filter *f, unsigned ac, char **av) static void dosend(filter *f, const octet *buf, size_t sz) { printf("send to `%s'\n", f->p_to->name); - IGNORE(write(f->p_to->sf.fd, buf, sz)); + DISCARD(write(f->p_to->sf.fd, buf, sz)); } static void addsend(filter *f, unsigned ac, char **av) @@ -722,8 +721,10 @@ int main(int argc, char *argv[]) parse(argv[i]); if (npeer != 2) die(1, "need two peers"); - for (;;) - sel_select(&sel); + for (;;) { + if (sel_select(&sel) && errno != EINTR) + die(1, "select failed: %s", strerror(errno)); + } #undef f_bogus }