Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Networking bug in sdlquake?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 kerryhall   Members   -  Reputation: 131

Like
0Likes
Like

Posted 08 October 2013 - 12:43 PM

Hi folks,

 

I'm trying to debug an issue with SDL quake. When trying to connect to a quake server over tcp/ip, I enter the ip address then press enter. The machine hangs, and I am unable to exit, change ttys, or run commands while connected via ssh. I ran strace to see what was going on, and here is the last output:

getsockname(5, {sa_family=AF_INET, sin_port=htons(2049), sin_addr=inet_addr("0.0.0.0")}, [16]) = 0  
setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0  
sendto(5, "\200\0\0\f\2QUAKE\0\3", 12, 0, {sa_family=AF_INET, sin_port=htons(26000), sin_addr=inet_addr("255.255.255.255")}, 16) = 12 
recvfrom(5,

And then the system hangs. SDLquake runs great besides that. Running svgalib as the video driver.

Running Debian 4.0. (I know, I know. It's old. Quake 1 is old too.)

Using sdl quake source found here: http://www.libsdl.org/projects/quake/



Sponsor:

#2 PeterStock   Members   -  Reputation: 405

Like
0Likes
Like

Posted 12 October 2013 - 11:39 AM

Maybe something to do with a socket being blocking when it is expected to be in non-blocking mode?



#3 kerryhall   Members   -  Reputation: 131

Like
0Likes
Like

Posted 14 October 2013 - 12:24 PM

Thanks Peter, I'll try exploring that and see if I can reproduce the issue in a piece of test code.

 

I noticed the following issue as well: when I try to start a server:

kerry@debian:~$ sudo netstat -ltpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     1727/portmap        
tcp        0      0 0.0.0.0:113             0.0.0.0:*               LISTEN     1925/inetd          
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     2162/sshd 

Not seeing anything listening on 26000, the port used for Quake. It also shows my ip as 127.0.1.1, when it should be 192.168.196.152 in this case.

 

I can certainly dive into the source and see exactly how it is trying to get the local ip address. Thanks!



#4 kerryhall   Members   -  Reputation: 131

Like
0Likes
Like

Posted 14 October 2013 - 12:32 PM

Also, I was incorrect about the system locking up. If I am sshd into my machine, I can issue a regular kill to the sdlquake process and have it exit as expected.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS