diff options
author | gthaker <gthaker@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-02-05 22:52:41 +0000 |
---|---|---|
committer | gthaker <gthaker@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-02-05 22:52:41 +0000 |
commit | 4725ecb83db0ed3d64ca4122aa1c281bd5a95844 (patch) | |
tree | 852ecc7c6424a704f0edb500e55d31b870f597c6 | |
parent | 1f2a751b06e1dc96b25d7e1985510e5f63e46e93 (diff) | |
download | ATCD-4725ecb83db0ed3d64ca4122aa1c281bd5a95844.tar.gz |
Function unmarshalledOctetServer, a thread function, previously had
return type void*. This would not compile under MS VC++ 6.0.
Changing the return type to ACE_THR_FUNCTION_RETURN solved the
problem.
-rw-r--r-- | performance-tests/SCTP/SOCK_STREAM_srv.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/performance-tests/SCTP/SOCK_STREAM_srv.cpp b/performance-tests/SCTP/SOCK_STREAM_srv.cpp index 71089c35dc5..5b62b0e6a4a 100644 --- a/performance-tests/SCTP/SOCK_STREAM_srv.cpp +++ b/performance-tests/SCTP/SOCK_STREAM_srv.cpp @@ -31,7 +31,7 @@ struct ArgStruct { // thread function that serves the client for the UnMarshalled Octet // test -static void * unmarshalledOctetServer (void *arg){ +static ACE_THR_FUNC_RETURN unmarshalledOctetServer (void *arg){ // unbundle the arguments ArgStruct * args = ACE_reinterpret_cast(ArgStruct *,arg); @@ -187,8 +187,6 @@ static void run_server (ACE_HANDLE handle) // deallocate the header buffer delete[] hdrBuf; - ACE_THR_FUNC server=unmarshalledOctetServer; - // bundle up the arguments ArgStruct * args = new ArgStruct; args->stream = dataModeStream; @@ -197,14 +195,14 @@ static void run_server (ACE_HANDLE handle) #if defined (ACE_HAS_THREADS) // Spawn a new thread and run the new connection in that thread of // control using the <server> function as the entry point. - if (ACE_Thread_Manager::instance ()->spawn (server, + if (ACE_Thread_Manager::instance ()->spawn (unmarshalledOctetServer, ACE_reinterpret_cast(void *,args), THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "spawn")); #else - (*server) (ACE_reinterpret_cast(void *, args)); + (*unmarshalledOctetServer) (ACE_reinterpret_cast(void *, args)); #endif /* ACE_HAS_THREADS */ } |