X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FFileHandle.cc;h=97e554c7389ae10043ddbe23584ead1c7cde936d;hb=51044eb18f034c1a059ffe2fb109a422c1cbe251;hp=0cc9b79cff40146b9028a03d3a87d265087d2036;hpb=145f6a7d0f3a6aaa77b3625351c952d24cb0b8a1;p=senf.git diff --git a/Socket/FileHandle.cc b/Socket/FileHandle.cc index 0cc9b79..97e554c 100644 --- a/Socket/FileHandle.cc +++ b/Socket/FileHandle.cc @@ -1,9 +1,9 @@ // $Id$ // // Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund // // 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 @@ -33,7 +33,7 @@ #include #include #include -#include "Utils/Exception.hh" +#include "../Utils/Exception.hh" #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// @@ -41,7 +41,7 @@ prefix_ void senf::FileBody::v_close() { if (::close(fd_) != 0) - throw SystemException(errno); + throwErrno(); } prefix_ void senf::FileBody::v_terminate() @@ -65,17 +65,17 @@ prefix_ bool senf::FileBody::blocking() const { int flags = ::fcntl(fd(),F_GETFL); - if (flags < 0) throw SystemException(errno); + if (flags < 0) throwErrno(); return ! (flags & O_NONBLOCK); } prefix_ void senf::FileBody::blocking(bool status) { int flags = ::fcntl(fd(),F_GETFL); - if (flags < 0) throw SystemException(errno); + if (flags < 0) throwErrno(); if (status) flags &= ~O_NONBLOCK; else flags |= O_NONBLOCK; - if (::fcntl(fd(), F_SETFL, flags) < 0) throw SystemException(errno); + if (::fcntl(fd(), F_SETFL, flags) < 0) throwErrno(); } /* We don't take POLLIN/POLLOUT as argument to avoid having to include @@ -96,7 +96,7 @@ prefix_ bool senf::FileBody::pollCheck(int fd, bool incoming, bool block) case EINTR: break; default: - throw SystemException(errno); + throwErrno(); } } while (rv<0); return rv>0;