summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2016-10-30 17:29:33 +0000
committerfrosch <frosch@openttd.org>2016-10-30 17:29:33 +0000
commit31f046bd9bfec6be5b5a24f113f3b301376763e6 (patch)
treeaa00cd46578f397c91e8238fe9f5a8b462b52b38 /src/network
parentdd190397d6cf16a731dd05a7f722eb76ad21c01f (diff)
downloadopenttd-31f046bd9bfec6be5b5a24f113f3b301376763e6.tar.xz
(svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/core/tcp_connect.cpp2
-rw-r--r--src/network/network_udp.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/network/core/tcp_connect.cpp b/src/network/core/tcp_connect.cpp
index ccbf93f3c..2dc789882 100644
--- a/src/network/core/tcp_connect.cpp
+++ b/src/network/core/tcp_connect.cpp
@@ -35,7 +35,7 @@ TCPConnecter::TCPConnecter(const NetworkAddress &address) :
address(address)
{
*_tcp_connecters.Append() = this;
- if (!ThreadObject::New(TCPConnecter::ThreadEntry, this, &this->thread)) {
+ if (!ThreadObject::New(TCPConnecter::ThreadEntry, this, &this->thread, "ottd:tcp")) {
this->Connect();
}
}
diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp
index 1cccbf644..1dc696065 100644
--- a/src/network/network_udp.cpp
+++ b/src/network/network_udp.cpp
@@ -109,7 +109,7 @@ static void NetworkUDPQueryServerThread(void *pntr)
void NetworkUDPQueryServer(NetworkAddress address, bool manually)
{
NetworkUDPQueryServerInfo *info = new NetworkUDPQueryServerInfo(address, manually);
- if (address.IsResolved() || !ThreadObject::New(NetworkUDPQueryServerThread, info)) {
+ if (address.IsResolved() || !ThreadObject::New(NetworkUDPQueryServerThread, info, NULL, "ottd:udp-query")) {
NetworkUDPQueryServerThread(info);
}
}
@@ -565,7 +565,7 @@ void NetworkUDPRemoveAdvertise(bool blocking)
/* Check if we are advertising */
if (!_networking || !_network_server || !_network_udp_server) return;
- if (blocking || !ThreadObject::New(NetworkUDPRemoveAdvertiseThread, NULL)) {
+ if (blocking || !ThreadObject::New(NetworkUDPRemoveAdvertiseThread, NULL, NULL, "ottd:udp-advert")) {
NetworkUDPRemoveAdvertiseThread(NULL);
}
}
@@ -648,7 +648,7 @@ void NetworkUDPAdvertise()
if (_next_advertisement < _last_advertisement) _next_advertisement = UINT32_MAX;
if (_next_retry < _last_advertisement) _next_retry = UINT32_MAX;
- if (!ThreadObject::New(NetworkUDPAdvertiseThread, NULL)) {
+ if (!ThreadObject::New(NetworkUDPAdvertiseThread, NULL, NULL, "ottd:udp-advert")) {
NetworkUDPAdvertiseThread(NULL);
}
}