Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

icecast + FreeBSD getaddrinfo()

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
tofig



Joined: 10 Jan 2009
Posts: 1

PostPosted: Sat Jan 10, 2009 12:06 pm    Post subject: icecast + FreeBSD getaddrinfo() Reply with quote

Good day,

recently I have updated my icecast installation to the latest version (2.3.2) available from the FreeBSD ports colletion. Update went fine, but icecast did not start. The only message it spit was: Server startup failed. Exiting

I have recompiled icecast with gdb support and found out that the problem is on the following line of the net/sock.c:

if (getaddrinfo (sinterface, service, &hints, &res))
return SOCK_ERROR;

After digging more into this I have discovered that sinterface holds hostname of my server, not the numerical ip address which contradicts with the fact that hints.flags forces numeric address usage according to the AI_NUMERICHOST bit set:

hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG | AI_NUMERICSERV | AI_NUMERICHOST;

After disabling AI_NUMERICHOST and recompiling - icecast started fine.
My operating system release is: FreeBSD 6.3-RELEASE-p4
I wonder if this issue is FreeBSD specific. Any comments ?

Thanks,
Tofig Suleymanov
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Jan 10, 2009 1:46 pm    Post subject: Reply with quote

normally people use the actual address for a bind parameter. I suppose for that particular call, the issue of delay is minimal as it's not a remote connection so dropping AI_NUMERICHOST should be fine.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber