along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-// $Id: dynlistener.cc,v 1.4 2002/12/30 22:25:14 ahu Exp $
+// $Id: dynlistener.cc,v 1.5 2002/12/30 22:53:41 ahu Exp $
/* (C) Copyright 2002 PowerDNS.COM BV */
#include <cstring>
#include <string>
int len;
sockaddr_un remote;
- socklen_t remlen;
+ socklen_t remlen=sizeof(remote);
if(d_udp) {
for(;;) {
d_client=accept(d_s,(sockaddr*)&remote,&remlen);
if(d_client<0) {
- L<<Logger::Error<<"Unable to accept controlsocket connection ("<<d_s<<") - exiting: "<<strerror(errno)<<endl;
+ L<<Logger::Error<<"Unable to accept controlsocket connection ("<<d_s<<"): "<<strerror(errno)<<endl;
continue;
}
if((len=recv(d_client,mesg,512,0))<0) {
- L<<Logger::Error<<"Unable to receive packet from controlsocket ("<<d_client<<") - exiting: "<<strerror(errno)<<endl;
+ L<<Logger::Error<<"Unable to receive packet from controlsocket ("<<d_client<<"): "<<strerror(errno)<<endl;
close(d_client);
continue;
}