[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Remote server crash



At this point I would like to point out the MASSIVE IRONY: Tim is
being sarcastic about people being scared of all his code changes,
when in this case it's one of his code changes that caused a severe
bug. Maybe Tim will notice that irony one day.

Scott, would you be able to try this patch?

Dan


2013/10/30 Scott Wilson <s.d.wilson@xxxxxxxxxx>:
> Tim's reply below. I guess it means that change could probably be reverted.
>
> S.
>
> Begin forwarded message:
>
> From: Tim Blechmann <tim@xxxxxxxxxx>
> Subject: Re: [sc-dev] Remote server crash
> Date: 30 October 2013 12:38:31 GMT
> To: Scott Wilson <s.d.wilson@xxxxxxxxxx>
>
> [...]
> 369 scsynth                             0x0000000101c76bbd
> operator==(ReplyAddress const&, ReplyAddress const&) + 29
> (SC_Reply.cpp:30)
> 370 scsynth                             0x0000000101c76bbd
> operator==(ReplyAddress const&, ReplyAddress const&) + 29
> (SC_Reply.cpp:30)
> 371 scsynth                             0x0000000101c76bbd
> operator==(ReplyAddress const&, ReplyAddress const&) + 29
> (SC_Reply.cpp:30)
> 372 scsynth                             0x0000000101c76bbd
> operator==(ReplyAddress const&, ReplyAddress const&) + 29
> (SC_Reply.cpp:30)
> 3
> [...]
>
>
> What I don't understand is how this code, in SC_Reply.cpp, could ever
> be anything other than an infinite loop:
>
>
> Copying Tim, as he seems to be the last person to touch that code.
>
>
> can probably just be removed ... it would be best to rewrite most of the
> io code with boost.asio, including networking, timers, serial, midi, hid
> to get rid of all the nasty race conditions, but well ... people will
> just complain that they don't understand the code, the full blast of
> 'just in case' arguments and the like ...
>
> whatever, sc is not dead, it just smells funny ...
>
> tim, who will soon get into qt5-land but without sc :/
>
>



-- 
http://www.mcld.co.uk
diff --git a/common/SC_Reply.cpp b/common/SC_Reply.cpp
index 5955469..2e02fc5 100644
--- a/common/SC_Reply.cpp
+++ b/common/SC_Reply.cpp
@@ -27,5 +27,8 @@ void null_reply_func(struct ReplyAddress *addr, char* msg, int size)
 
 bool operator==(const ReplyAddress& a, const ReplyAddress& b)
 {
-	return a == b;
+	return     a.mAddress  == b.mAddress
+		&& a.mProtocol == b.mProtocol
+		&& a.mPort     == b.mPort
+		&& a.mSocket   == b.mSocket;
 }