X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FDVB%2FDVBFrontendHandle.cc;h=7092bdae917219e46c4061eaafa4724461e4560e;hb=6f50bf49e282c0528f51faa0a245bbfa2b867399;hp=a90eca4984c68efe3c877e71cec1a1a410ef150c;hpb=8d2d26f114d3df0a60c5c516fcf40671b1e55558;p=senf.git diff --git a/Socket/Protocols/DVB/DVBFrontendHandle.cc b/Socket/Protocols/DVB/DVBFrontendHandle.cc index a90eca4..7092bda 100644 --- a/Socket/Protocols/DVB/DVBFrontendHandle.cc +++ b/Socket/Protocols/DVB/DVBFrontendHandle.cc @@ -1,9 +1,9 @@ // $Id$ // // Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Thorsten Horstmann +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Thorsten Horstmann // // 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 @@ -45,10 +45,10 @@ prefix_ void senf::DVBFrontendProtocol::init_client(uint8_t adapter, boost::uint { std::string devFrontend = str( boost::format( "/dev/dvb/adapter%d/frontend%d") % adapter % device); - int fd = open(devFrontend.c_str(), O_RDONLY | O_NONBLOCK); - if (fd < 0) - throw SystemException(errno); - body().fd(fd); + int f = open(devFrontend.c_str(), O_RDONLY | O_NONBLOCK); + if (f < 0) + throwErrno(); + fd(f); } prefix_ unsigned senf::DVBFrontendProtocol::available() @@ -63,18 +63,11 @@ prefix_ bool senf::DVBFrontendProtocol::eof() return false; } -prefix_ std::auto_ptr senf::DVBFrontendProtocol::clone() - const -{ - return std::auto_ptr(new DVBFrontendProtocol()); -} - - prefix_ void senf::DVBFrontendProtocol::signalStrength(int16_t *strength) const { - if (::ioctl(body().fd(), FE_READ_SIGNAL_STRENGTH, strength) < 0) - throw SystemException(errno); + if (::ioctl(fd(), FE_READ_SIGNAL_STRENGTH, strength) < 0) + throwErrno(); } ///////////////////////////////cc.e////////////////////////////////////////