Fix network connection from the command-line

This commit is contained in:
simon.kagstrom 2009-11-01 08:44:34 +00:00
parent 958eddfd37
commit 9d19e9c876
2 changed files with 3 additions and 10 deletions

View File

@ -63,16 +63,10 @@ void C64::c64_ctor1(void)
this->peer = NULL;
if (fixme_tmp_network_server) {
printf("Connecting to %s\n", fixme_tmp_network_server);
strcpy(this->server_hostname, fixme_tmp_network_server);
this->peer = new Network(this->server_hostname, this->server_port);
this->network_connection_type = MASTER;
printf("Waiting for connection\n");
if (this->peer->Connect() == false)
{
printf("No client connected. Bye\n");
delete this->peer;
this->peer = NULL;
}
this->network_connection_type = CONNECT;
}
}

View File

@ -107,10 +107,9 @@ char *fixme_tmp_network_server = 0;
void Frodo::ArgvReceived(int argc, char **argv)
{
printf("Argc: %d\n", argc);
if (argc == 2)
{
fixme_tmp_network_server = argv[1];
}
}