aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-02-07 19:42:29 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2012-02-16 12:43:06 +0100
commitc59881eaee61ae7d3b16001a75b9fd9fd09af297 (patch)
treed2647c529d3798fdfe794df6c5add91312fef092 /src/bitcoinrpc.cpp
parent999b4cacaf53189dc9e8d5c6373c1f3da5b8ae4c (diff)
Symbolic names for threads
Introduce an enum threadId, and use symbolic indices when accessing vnThreadsRunning.
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r--src/bitcoinrpc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index cf5bc64bb9..30a6344b8f 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -2355,15 +2355,15 @@ void ThreadRPCServer(void* parg)
IMPLEMENT_RANDOMIZE_STACK(ThreadRPCServer(parg));
try
{
- vnThreadsRunning[4]++;
+ vnThreadsRunning[THREAD_RPCSERVER]++;
ThreadRPCServer2(parg);
- vnThreadsRunning[4]--;
+ vnThreadsRunning[THREAD_RPCSERVER]--;
}
catch (std::exception& e) {
- vnThreadsRunning[4]--;
+ vnThreadsRunning[THREAD_RPCSERVER]--;
PrintException(&e, "ThreadRPCServer()");
} catch (...) {
- vnThreadsRunning[4]--;
+ vnThreadsRunning[THREAD_RPCSERVER]--;
PrintException(NULL, "ThreadRPCServer()");
}
printf("ThreadRPCServer exiting\n");
@@ -2443,7 +2443,7 @@ void ThreadRPCServer2(void* parg)
#endif
ip::tcp::endpoint peer;
- vnThreadsRunning[4]--;
+ vnThreadsRunning[THREAD_RPCSERVER]--;
#ifdef USE_SSL
acceptor.accept(sslStream.lowest_layer(), peer);
#else