Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2009, 02:55 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Nice work (although I haven't had a chance to test it yet).

One thing I did notice is that in Handle_OP_AugmentInfo you FastQueue a packet and then call safe_delete to free the memory. FastQueue (unlike QueuePacket) should free the memory itself, so you shouldn't call safe_delete following FastQueue.
Reply With Quote
  #2  
Old 05-01-2009, 06:01 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Yeah the idea by fastqueue is you basically pass ownership of the packet to the queue and it will free up all the memory after. It's a perfectly legitimate practice to use fastqueue for almost everything actually, you only really need queuepacket for when you want to send a packet more than once without recreating it (some spell and group code does this).
Reply With Quote
  #3  
Old 05-02-2009, 07:27 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

I committed this in Rev452. Thanks again.
Reply With Quote
  #4  
Old 05-02-2009, 11:54 AM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

Quote:
Originally Posted by Derision View Post
One thing I did notice is that in Handle_OP_AugmentInfo you FastQueue a packet and then call safe_delete to free the memory. FastQueue (unlike QueuePacket) should free the memory itself, so you shouldn't call safe_delete following FastQueue.
Ok, I see that... now. I saw that FastQueue didn't make a copy of the data like QueuePacket did, but somehow missed that it cleared the pointer and freed the memory. Whenever there's a safe delete macro, I try to err on the side of freeing the memory.

Thanks for the info, though. The packet stream part of the code is still fairly mysterious to me, and any detail I don't have to search through functions to learn is a huge help.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump

   

All times are GMT -4. The time now is 06:56 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3