summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-02-28 20:28:08 +0000
committeryexo <yexo@openttd.org>2010-02-28 20:28:08 +0000
commit404df87b1f2e0c6ae8d71dd0ea83b55294f53af3 (patch)
tree868c12ba0cf41427a4c00eff31601f6e45398be4 /src/network
parent333249ce501085405afabac8eb61a2c3ed599c0f (diff)
downloadopenttd-404df87b1f2e0c6ae8d71dd0ea83b55294f53af3.tar.xz
(svn r19295) -Codechange: introduce wrapper functions for GRFConfig::name/info
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_udp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp
index 29ecebe37..14cab7647 100644
--- a/src/network/network_udp.cpp
+++ b/src/network/network_udp.cpp
@@ -190,7 +190,7 @@ DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_GET_NEWGRFS)
* the current list and do not send the other data.
* The name could be an empty string, if so take the filename. */
packet_len += sizeof(c.grfid) + sizeof(c.md5sum) +
- min(strlen((!StrEmpty(f->name)) ? f->name : f->filename) + 1, (size_t)NETWORK_GRF_NAME_LENGTH);
+ min(strlen(f->GetName()) + 1, (size_t)NETWORK_GRF_NAME_LENGTH);
if (packet_len > SEND_MTU - 4) { // 4 is 3 byte header + grf count in reply
break;
}
@@ -206,7 +206,7 @@ DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_GET_NEWGRFS)
char name[NETWORK_GRF_NAME_LENGTH];
/* The name could be an empty string, if so take the filename */
- strecpy(name, (!StrEmpty(in_reply[i]->name)) ? in_reply[i]->name : in_reply[i]->filename, lastof(name));
+ strecpy(name, in_reply[i]->GetName(), lastof(name));
this->Send_GRFIdentifier(&packet, &in_reply[i]->ident);
packet.Send_string(name);
}
@@ -256,7 +256,7 @@ DEF_UDP_RECEIVE_COMMAND(Client, PACKET_UDP_SERVER_RESPONSE)
for (c = item->info.grfconfig; c != NULL; c = c->next) {
if (c->status == GCS_NOT_FOUND) item->info.compatible = false;
- if (c->status != GCS_NOT_FOUND || strcmp(c->name, UNKNOWN_GRF_NAME_PLACEHOLDER) != 0) continue;
+ if (c->status != GCS_NOT_FOUND || strcmp(c->GetName(), UNKNOWN_GRF_NAME_PLACEHOLDER) != 0) continue;
in_request[in_request_count] = c;
in_request_count++;
}