Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1 [0.6] Network mode doesn't work for me

open-accepted
None
7
2004-06-16
2003-11-01
Jerome Zago
No

Linux distributions:
- agt (10.0.0.1) : Linux Mandrake 9.1 with updates
- aurelien (10.0.0.1) : Linux Mandrake 9.2 with
updates

So agt and aurelien both compile it. agt launches it in
server mode :

-----
$ make
cc -I/usr/include/SDL -D_REENTRANT -Wall -c -o
src/BFont.o src/BFont.c
cc -I/usr/include/SDL -D_REENTRANT -Wall -c -o
src/2Pong.o src/2Pong.c
src/2Pong.c: In function `png_load':
src/2Pong.c:57: warning: implicit declaration of
function `IMG_LoadPNG_RW'
src/2Pong.c:57: warning: assignment makes pointer
from integer without a cast
src/2Pong.c: In function `start_server':
src/2Pong.c:70: warning: passing arg 1 of `htons'
makes integer from pointer without a cast
src/2Pong.c:72: warning: passing arg 2 of `bind' from
incompatible pointer type
src/2Pong.c: In function `connect_server':
src/2Pong.c:84: warning: passing arg 1 of `htons'
makes integer from pointer without a cast
src/2Pong.c: In function `Bounce':
src/2Pong.c:218: warning: suggest explicit braces to
avoid ambiguous `else'
src/2Pong.c:223: warning: suggest parentheses
around assignment used as truth value
src/2Pong.c: In function `main':
src/2Pong.c:428: warning: passing arg 5 of `recvfrom'
from incompatible pointer type
src/2Pong.c:439: warning: passing arg 5 of `sendto'
from incompatible pointer type
src/2Pong.c:445: warning: passing arg 2 of
`SDL_AddTimer' from incompatible pointer type
src/2Pong.c:445: warning: passing arg 3 of
`SDL_AddTimer' makes pointer from integer without a
cast
src/2Pong.c:464: warning: passing arg 5 of `recvfrom'
from incompatible pointer type
src/2Pong.c:466: warning: passing arg 5 of `sendto'
from incompatible pointer type
src/2Pong.c:472: warning: passing arg 5 of `sendto'
from incompatible pointer type
src/2Pong.c:499: warning: passing arg 2 of
`SDL_AddTimer' from incompatible pointer type
src/2Pong.c:499: warning: passing arg 3 of
`SDL_AddTimer' makes pointer from integer without a
cast
src/2Pong.c:500: warning: passing arg 2 of
`SDL_AddTimer' from incompatible pointer type
src/2Pong.c:500: warning: passing arg 3 of
`SDL_AddTimer' makes pointer from integer without a
cast
src/2Pong.c:516: warning: passing arg 2 of
`SDL_AddTimer' from incompatible pointer type
src/2Pong.c:516: warning: passing arg 3 of
`SDL_AddTimer' makes pointer from integer without a
cast
src/2Pong.c:517: warning: passing arg 2 of
`SDL_AddTimer' from incompatible pointer type
src/2Pong.c:517: warning: passing arg 3 of
`SDL_AddTimer' makes pointer from integer without a
cast
src/2Pong.c:623: warning: passing arg 5 of `recvfrom'
from incompatible pointer type
src/2Pong.c:633: warning: passing arg 5 of `sendto'
from incompatible pointer type
src/2Pong.c:640: warning: passing arg 5 of `sendto'
from incompatible pointer type
src/2Pong.c:644: warning: passing arg 5 of `recvfrom'
from incompatible pointer type
gcc -I/usr/include/SDL -D_REENTRANT -Wall -o
2Pong src/BFont.o src/2Pong.o -lSDL_image
-L/usr/lib -lSDL -lpthread -lSDL_mixer

$ su -c 'make install'
Password:
echo "#!/bin/bash" > src/2Pong
echo "cd "/usr/local"/share/2Pong/" >> src/2Pong
echo "./2Pong" >> src/2Pong
mkdir -p "/usr/local"/share/2Pong//Graphics/
mkdir -p "/usr/local"/share/2Pong//Sound/
install 2Pong "/usr/local"/share/2Pong/
install src/2Pong "/usr/local"/bin
install Graphics/* "/usr/local"/share/2Pong//Graphics/
install Sound/* "/usr/local"/share/2Pong//Sound/

$ cd; 2Pong -server 5412
looking...
unlooking...
looking...
unlooking...
[screen with "2Pong v0.6" and "Choose A Mode"
menu]
-----

aurelien launches it in client mode :

-----
$ cd; 2Pong -client 10.0.0.1 5412
looking...
unlooking...
looking...
unlooking...
[screen with "2Pong v0.6" and "Choose A Mode"
menu]
-----

agt selects "Regular" then "Easy" : agt plays it against
the AI. Nothing happens at aurelien. Now at agt (the
"server" still running), I check whether a port is actually
opened :

-----
$ netstat -l | grep 5412
$
-----

It seems that the Internet socket at port 5412 doesn't
exist.

More information and extra testing upon request.
Thanks for your time.

Discussion

    • priority: 5 --> 7
    • assigned_to: nobody --> kirsh-
    • status: open --> open-accepted