Page 1 of 1

hooking the same packet twice.

Posted: Sun Feb 22, 2009 8:07 pm
by Bishop
I accidentally hooked the same packet twice. whenever I logged into the server it would crash without generating a dump. just wanted to let you know. odd that pol didn't report this somehow when it was initializing the hooks. not really a big thing, but would have saved me a few hours time if it had complained about it (yeah, it was totally my fault to begin with)

Re: hooking the same packet twice.

Posted: Sun Feb 22, 2009 9:09 pm
by Nando
Just reading the code, it seems to already care for multiply defined packets, logging them. Would you mind posting the crash dump?

Re: hooking the same packet twice.

Posted: Sun Feb 22, 2009 9:12 pm
by Bishop
as i said, there was no dump generated. the console said it was generating one, but it just created an empty file.

Re: hooking the same packet twice.

Posted: Sun Feb 22, 2009 9:14 pm
by Nando
Ouch :/

Sorry, didn't read the "without". Weird, very weird.

Re: hooking the same packet twice.

Posted: Sun Feb 22, 2009 9:56 pm
by MuadDib
Nando, where you need to look is the definition of incoming/outgoing script references for it. You can define the same packet in multiple locations for separate packages handling subcommands (iirc). So it's the definition of main packet that needs to be worried about also.

If you still have trouble, I can try getting time through the week to look at it after work or something, if the wife doesn't decide to do a lot of shopping this week, lol.

Re: hooking the same packet twice.

Posted: Sat Feb 28, 2009 12:36 am
by MuadDib
Core reports the error, but, goes on and let's it load. Check start.log to see if it was listed in there when initializing the packethooks. Should say something:

Code: Select all

Packet hook receive function multiply defined for packet <your packet ID here>