Gnutella Forums  

Go Back   Gnutella Forums > Gnutella News and Gnutelliums Forums > General Gnutella Development Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

General Gnutella Development Discussion For general discussion about Gnutella development.


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #25 (permalink)  
Old May 23rd, 2002
Gnutella Veteran
 
Join Date: March 24th, 2002
Location: Virginia
Posts: 101
tshdos is flying high
Default

It looks like the reason it froze up is because you have functions that exit without unlocking the application ie:

Function asdf
Application.Lock

If A ="" Then
' should be an application.unlock here
Exit Function
End If

...

Application.Unlock
End Function


The reason for the locks is to keep the counts correct.
An example would be if two clients hit the following line at the same time.
Application("count") = Application("count") + 1
If you assume Application("count") = 0 before they hit this line two things could happen. Either it will work fine and the count will
be 2 or when both clients get the value of count before adding one they both get the value 0 in which case both clients set the count to 1. Honestly if you are not going to get a lot of hits at the same time you don't really have to worry about this, but it doesn't hurt performance if done correctly. You only need to when updating really.

Quote:
I said in the readme that you should change the
default values due security measures.
I did not notice the line said '// Change default values.
But you should probably set the default to something besides 1 since most of the other functions use a 1. Just some advice though.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 03:32 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.