Broadcaster Plugin Received Data Fix
Posted: Tue Jul 12, 2016 4:44 am
This is a fix for the broadcaster plugin. the plugin when receiving data doesn't check to see if the data is within the decimal range of 32 - 127, and by not checking this when triggering an event throws an unhandled exception and drops the bound port it's listening on stopping the plugin from working. wich you would either have to disable and then enable the plugin or restart EG to get the plugin listening again.
I have added handling for the exception as well as having an error printed stating that the data is outside of printable range and also includes the senders IP address. it also searches the data for the bad character(s) and converts them to hex values. the traceback and reformatted message and the senders ip are sent off to be printed in the debug log file.
by catching this error the plugin is able to continue along like nothing ever happened.
I have attached the modified plugin.
this code has not been fully tested. as it would take some time for me to cause this problem intentionally . there is a forum member who now has the new code and will hopefully tell me that it works properly. this problem can take weeks to show in their setup. so i figured i would post it in the off chance someone else may have had the same issue and might shed some light on if it's working or now. and hopefully have a solution to their problem.
this code does compile without error.
the file is attached. just download it and copy it into the C:\Program Files (x86)\EventGhost\plugins\Broadcaster if that is where your installation of EG is located. overwrite the existing file. and restart EG. Everything functions the same save for the plugin dropping connection if bad data is received.
I have added handling for the exception as well as having an error printed stating that the data is outside of printable range and also includes the senders IP address. it also searches the data for the bad character(s) and converts them to hex values. the traceback and reformatted message and the senders ip are sent off to be printed in the debug log file.
by catching this error the plugin is able to continue along like nothing ever happened.
I have attached the modified plugin.
this code has not been fully tested. as it would take some time for me to cause this problem intentionally . there is a forum member who now has the new code and will hopefully tell me that it works properly. this problem can take weeks to show in their setup. so i figured i would post it in the off chance someone else may have had the same issue and might shed some light on if it's working or now. and hopefully have a solution to their problem.
this code does compile without error.
the file is attached. just download it and copy it into the C:\Program Files (x86)\EventGhost\plugins\Broadcaster if that is where your installation of EG is located. overwrite the existing file. and restart EG. Everything functions the same save for the plugin dropping connection if bad data is received.