- fixes #1560
I've never worked with a LOCK() before ... so please help me learning this concept :).
Shouldn't you lock all accesses of the proxy settings, not only in the UI code?
Also, where is cs_proxysettings defined?
- fixes #1560
You need a LOCK around every place where the data structure you want to protect is accessed. Defining the critical section locally in a function makes no sense.
I saw this in the code somewhere else, feeling a little dumb now. I don't want to fiddle around further!
Can we lock proxyInfo and nameproxyInfo in SetProxy() and SetNameProxy()? Where should the CCriticalSection be placed? Or is there one we can re-use?
As this seems not matured, I'll close this for now. Any help here is greatly appreciated :).
I recommend you read up a bit on parallel programming and synchronization primitives (especially mutexes, in this case), it really helps to know the theory here and it's pretty interesting in any case.
Indeed, I'll take a quick tour and try again afterwards ^^.