cast -1 to the SLPError so that the code works with openSLP-2.0

Please merge so that I can submit the new openslp version to Factory.