Bug 50363 - Port for the sever is not saved (enven during game)
Summary: Port for the sever is not saved (enven during game)
Status: RESOLVED FIXED
Alias: None
Product: boson
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: The Boson Team
URL:
Keywords:
: 55752 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-07 21:49 UTC by Felix Seeger
Modified: 2003-03-21 01:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Seeger 2002-11-07 21:49:03 UTC
Version:           v0.7 (using KDE 3.0.9 (KDE 3.1 RC1))
Installed from:    compiled sources
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease)
OS:          Linux (i686) release 2.4.19

Start a local server with another port than the default
Go back to the new game dialog
Go the the server settings
 --> default port number (but the server is listening on the right number)
Comment 1 Andreas Beckermann 2003-03-09 18:20:42 UTC
*** Bug 55752 has been marked as a duplicate of this bug. ***
Comment 2 Andreas Beckermann 2003-03-13 15:13:28 UTC
This is some kind of KGame/QSocket bug. It's a bit more complex, so it will require some 
time to be fixed. Problem is that QSocket is asynchron so when connectToHost() returns it 
is not yet connected. KGame does not yet use the connected() signal unfortunately. Only 
after that signal has been emitted QSocket returns a valid port number. 
 
The workaround is to store the port as a global static variable in the startup widget once we 
start to connect, but I want to commit that fix only once I have a real fix for this (which 
requires patching libkdegames) 
 
CU 
Andi 
 
Comment 3 Andreas Beckermann 2003-03-21 01:49:56 UTC
I have now committed an update to both, boson and KGame which fixes this bug. 
To fix the asynchron-problem we can easily use signalClientConnected(). KGame::port() in 
a recent KGame version will provide the correct port, for older KGame versions we use a 
hack (thanks to Qt, which allows that :)). 
 
CU 
Andi