1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-10 07:44:14 +01:00

Fixes in the host class

This commit is contained in:
dan
1999-12-14 21:35:28 +00:00
parent bf4c63d657
commit 087fc7c82c
2 changed files with 94 additions and 53 deletions

View File

@@ -132,11 +132,16 @@ static void
didInitialize(ConnectionDelegate *self, WMConnection *cPtr)
{
int state = WMGetConnectionState(cPtr);
WMHost *host;
if (state == WCConnected) {
fprintf(stderr, "connected to '%s:%s'\n", WMGetConnectionAddress(cPtr),
host = WMGetHostWithAddress(WMGetConnectionAddress(cPtr));
fprintf(stderr, "connected to '%s:%s'\n",
host?WMGetHostName(host):WMGetConnectionAddress(cPtr),
WMGetConnectionService(cPtr));
initialized = 1;
if (host)
WMReleaseHost(host);
return;
} else {
wsyserrorwithcode(WCErrorCode, "Unable to connect");