X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fmeta.c;h=b59f15b09443f47596d8e60454686e262c5298b7;hp=77203f60c62f7209f7311ec30921b72aaec4265d;hb=36f8e4da8b1708474505f5a1fa8cf1ba848921de;hpb=af95368c0f30955f0e13b587d5d6d4989fd5a83e diff --git a/src/meta.c b/src/meta.c index 77203f60..b59f15b0 100644 --- a/src/meta.c +++ b/src/meta.c @@ -1,7 +1,7 @@ /* meta.c -- handle the meta communication - Copyright (C) 2000-2005 Guus Sliepen , - 2000-2005 Ivo Timmermans + Copyright (C) 2000-2006 Guus Sliepen , + 2000-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,6 +41,11 @@ bool send_meta(connection_t *c, const char *buffer, int length) cp(); + if(!c) { + logger(LOG_ERR, _("send_meta() called with NULL pointer!")); + abort(); + } + ifdebug(META) logger(LOG_DEBUG, _("Sending %d bytes of metadata to %s (%s)"), length, c->name, c->hostname); @@ -94,10 +99,12 @@ bool flush_meta(connection_t *c) c->name, c->hostname); } else if(errno == EINTR) { continue; +#ifdef EWOULDBLOCK } else if(errno == EWOULDBLOCK) { ifdebug(CONNECTIONS) logger(LOG_DEBUG, _("Flushing %d bytes to %s (%s) would block"), c->outbuflen, c->name, c->hostname); return true; +#endif } else { logger(LOG_ERR, _("Flushing meta data to %s (%s) failed: %s"), c->name, c->hostname, strerror(errno));