chiark / gitweb /
Various C files: Ignore write errors of UDP and IP datagrams.
[tripe] / proxy / tripe-mitm.c
index 107362eed6bfb1ca1488cd03e6ddd088316f903f..3686b7ba4e4691ee73fabb3a8f22b97a3a16b23d 100644 (file)
@@ -1,13 +1,11 @@
 /* -*-c-*-
- *
- * $Id$
  *
  * An evil proxy for TrIPE
  *
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * 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 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.
@@ -408,8 +406,10 @@ static void adddelay(filter *f, unsigned ac, char **av)
 
 static void dosend(filter *f, const octet *buf, size_t sz)
 {
+  int hunoz;
+
   printf("send to `%s'\n", f->p_to->name);
-  write(f->p_to->sf.fd, buf, sz);
+  hunoz = write(f->p_to->sf.fd, buf, sz);
 }
 
 static void addsend(filter *f, unsigned ac, char **av)
@@ -483,7 +483,7 @@ static void floodtimer(struct timeval *tv, void *vv)
   PASS(f->p->f, buf, sz);
   setflood(f);
 }
-  
+
 static void setflood(flood *f)
 {
   struct timeval tv;