Petteri Räty kirjoitti: > Petteri Räty kirjoitti: >> Basically it seems to go into an endless loop when it can't get the >> socket and I must then kill it with kill -9 . >> > > Attached is a patch that fixes this. > > Regards, > Petteri > > Can someone explain why this code is in the main loop in the first place. I would think that the sockets need to be created only once. // Master socket sockfd = make_server_socket(); if(sockfd<0) { DBG("Cannot get UNIX socket"); return -1; } avdtpfd = a2dp_make_listen_socket(25); if(avdtpfd<0) { DBG("Cannot get AVDTP socket"); return -1; } Regards, Petteri