addConsoleMessage(tr("Couldn't listen on any of the given ports."),QString::fromUtf8("red"));
inttried_port=p->endpoint.port();
srand(time(0));
intfallback_port=tried_port;
do{
fallback_port=rand()%64512+1024;
}while(fallback_port==tried_port);
addConsoleMessage(tr("Couldn't listen on port %1, using %2 instead.").arg(QString::number(tried_port)).arg(QString::number(fallback_port)),QString::fromUtf8("red"));
setListeningPort(fallback_port);
//emit portListeningFailure();
}
/*else if (torrent_paused_alert* p = dynamic_cast<torrent_paused_alert*>(a.get())) {