Bug: Registering default IMC packets breaks if another module registers one first Danger: Medium - IMC default packets used to run the majority of the network functions will not work, rendering the client useless. Found by: Samson Fixed by: Samson
—
imc.c, global variables
Locate:
bool imcpacketdebug = FALSE;
Below that, add:
bool default_packets_registered = FALSE; // Cheesy global for a stupid problem!
imc.c, imc_register_default_packets
Locate:
/* * Once registered, these are not cleared unless the mud is shut down */ if( first_phandler ) return;
Change to:
/* * Once registered, these are not cleared unless the mud is shut down */ if( default_packets_registered ) return;
If you have other code modules which use the IMC network and they register packet handlers ( which they should, IMC won't process them without one ) any module which loads and initializes itself before IMC has a chance to register its own default packets will cause first_handler to not be NULL anymore and thus bail out when it shouldn't. So it needed to be tweaked a bit to prevent that from happening.
Danger: Medium - IMC default packets used to run the majority of the network functions will not work, rendering the client useless.
Found by: Samson
Fixed by: Samson
—
imc.c, global variables
Locate:
Below that, add:
imc.c, imc_register_default_packets
Locate:
Change to:
Locate:
Below that, add:
If you have other code modules which use the IMC network and they register packet handlers ( which they should, IMC won't process them without one ) any module which loads and initializes itself before IMC has a chance to register its own default packets will cause first_handler to not be NULL anymore and thus bail out when it shouldn't. So it needed to be tweaked a bit to prevent that from happening.