if(CONFIG_LOG_MSG) writeLog("Received Service Request\n" + msg.toString());
logMessage("Received Message:", msg);
    private SLPMessageHeader handleServiceRequest(SLPInputStream sis, boolean isUDP) {        // create the message object        SLPSrvReqMessage msg = new SLPSrvReqMessage();        int error = 0;        try {            msg.fromInputStream(sis);            if(msg.getPRList().indexOf(address.getHostAddress()) != -1) {                if(CONFIG_DEBUG) System.out.println("Has replied before...");                return null;            }        }catch(ServiceLocationException sle) {            // parse error.            // if we received a unicast request, we should reply with an error            error = sle.getErrorCode();        }                if(CONFIG_LOG_MSG) writeLog("Received Service Request\n" + msg.toString());                if(error == 0) {            if(msg.getScopes().size()==0 || SLPUtil.supportScopes(supportedScopes, msg.getScopes())) {                // if the request is for the directory-agent service, we need to return                // a DAAdvert. (If there was no error and we support the requested scope(s))                if(msg.getServiceType().toString().equalsIgnoreCase(DA_TYPE)) {                    return createDAAdvert(msg.getLanguage(), msg.getXID());                }            }//scopes            else {                if(CONFIG_LOG_ERRORS)writeLog("Scope NOT supported: " + msg.getScopes().toString());                if(msg.getScopes().isEmpty())System.out.println("No scope list provided");                System.out.println("num scopes: " + msg.getScopes().size());                error = ServiceLocationException.SCOPE_NOT_SUPPORTED;            }        }//error                // We have a normal service request, or there was an error.        return SLPRequestHandlers.handleServiceRequest(database, msg, error,                                                       CONFIG_SLP_MTU,                                                       isUDP);    }