Fixed the bug which prevents --bt-lpd-interface from working.

Fixes bug#3520125
pull/16/merge
Tatsuhiro Tsujikawa 2012-04-22 18:35:43 +09:00
parent a0912d9e4a
commit d16071d108
1 changed files with 2 additions and 1 deletions

View File

@ -237,7 +237,8 @@ void BtSetup::setup(std::vector<Command*>& commands,
for(std::vector<std::pair<sockaddr_union, socklen_t> >::const_iterator
i = ifAddrs.begin(), eoi = ifAddrs.end(); i != eoi; ++i) {
char host[NI_MAXHOST];
if(inetNtop(AF_INET, &(*i).first.in, host, sizeof(host)) == 0 &&
if(inetNtop(AF_INET, &(*i).first.in.sin_addr, host,
sizeof(host)) == 0 &&
receiver->init(host)) {
initialized = true;
break;