}catch(ServiceLocationException e) { logError("Error parsing message", e); error = e.getErrorCode(); } if(error == 0) { logMessage("Received Message: ", msg);
    private SLPMessageHeader recvSrvTypeReqMessage(SLPInputStream sis, boolean isUDP) {        int error = 0;        SLPSrvTypeReqMessage msg = new SLPSrvTypeReqMessage();        try {            msg.fromInputStream(sis);            // if we have replied to this message before: do nothing.            if(msg.getPRList().indexOf(address.getHostAddress()) != -1) {                return null; //have replied before...            }        }catch(ServiceLocationException e) {            e.printStackTrace();            error = e.getErrorCode();        }        if(error == 0) {            // check scopes...            if(!SLPUtil.supportScopes(supportedScopes, msg.getScopes())) {                error = ServiceLocationException.SCOPE_NOT_SUPPORTED;            }        }//error                // handle request        return SLPRequestHandlers.handleServiceTypeRequest(database,                                                           msg,                                                           error,                                                           CONFIG_SLP_MTU,                                                           isUDP);    }