// $Id$
//
-// Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-// Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Copyright (C) 2006
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
//
// 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
rv = 0;
break;
default:
- throw SystemException(errno);
+ SENF_THROW_SYSTEM_EXCEPTION("");
}
} while (rv<0);
return rv;
rv = 0;
break;
default:
- throw SystemException(errno);
+ SENF_THROW_SYSTEM_EXCEPTION("");
}
} while (rv<0);
return rv;
case EINTR:
break;
case EAGAIN:
+ case ECONNREFUSED:
+ // Writing to a UDP socket seems return this error code if a corresponding ICMP
+ // error code has been received before (at least on linux). This is inconsistent
+ // since I cannot rely on getting ECONNREFUSED. I therefore ignore this error. TCP
+ // sockets will return this error on connect() and not on write(). Therefore we can
+ // unconditionally ignore this error here.
rv = 0;
break;
default:
- throw SystemException(errno);
+ SENF_THROW_SYSTEM_EXCEPTION("");
}
} while (rv<0);
return rv;
prefix_ unsigned senf::WriteablePolicy::do_writeto(FileHandle handle,
char const * buffer, unsigned size,
- struct sockaddr * addr, socklen_t len)
+ struct sockaddr const * addr, socklen_t len)
{
int rv = -1;
do {
rv = 0;
break;
default:
- throw SystemException(errno);
+ SENF_THROW_SYSTEM_EXCEPTION("");
}
} while (rv<0);
return rv;
}
-
+
///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_
//#include "ReadWritePolicy.mpp"
\f
// Local Variables:
// mode: c++
+// fill-column: 100
// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
// End: