• Home
  • Raw
  • Download

Lines Matching refs:rqst

98 int ServiceController::GetRqst(const MsgHeader& hdr, char* rqst, int expectedLen)  in GetRqst()  argument
104 int ret = m_communicationSocket->Read(rqst, hdr.len); in GetRqst()
418 int ServiceController::CheckOutputRqst(const OutputRqst& rqst) in CheckOutputRqst() argument
420 if (((rqst.types & (0b01 << LOG_KMSG)) != 0) && (GetBitsCount(rqst.types) > 1)) { in CheckOutputRqst()
423 if (rqst.domainCount > MAX_DOMAINS) { in CheckOutputRqst()
426 if (rqst.tagCount > MAX_TAGS) { in CheckOutputRqst()
429 if (rqst.pidCount > MAX_PIDS) { in CheckOutputRqst()
434 if (uid != ROOT_UID && uid != SHELL_UID && rqst.pidCount > 0) { in CheckOutputRqst()
440 void ServiceController::LogFilterFromOutputRqst(const OutputRqst& rqst, LogFilter& filter) in LogFilterFromOutputRqst() argument
442 if (rqst.types == 0) { in LogFilterFromOutputRqst()
445 filter.types = rqst.types; in LogFilterFromOutputRqst()
447 if (rqst.levels == 0) { in LogFilterFromOutputRqst()
448 filter.levels = ~rqst.levels; // 0 means all in LogFilterFromOutputRqst()
450 filter.levels = rqst.levels; in LogFilterFromOutputRqst()
453 filter.blackDomain = rqst.blackDomain; in LogFilterFromOutputRqst()
454 filter.domainCount = rqst.domainCount; in LogFilterFromOutputRqst()
455 for (i = 0; i < rqst.domainCount; i++) { in LogFilterFromOutputRqst()
456 filter.domains[i] = rqst.domains[i]; in LogFilterFromOutputRqst()
458 filter.blackTag = rqst.blackTag; in LogFilterFromOutputRqst()
459 filter.tagCount = rqst.tagCount; in LogFilterFromOutputRqst()
460 for (i = 0; i < rqst.tagCount; i++) { in LogFilterFromOutputRqst()
461 (void)strncpy_s(filter.tags[i], MAX_TAG_LEN, rqst.tags[i], MAX_TAG_LEN - 1); in LogFilterFromOutputRqst()
463 filter.blackPid = rqst.blackPid; in LogFilterFromOutputRqst()
464 filter.pidCount = rqst.pidCount; in LogFilterFromOutputRqst()
465 for (i = 0; i < rqst.pidCount; i++) { in LogFilterFromOutputRqst()
466 filter.pids[i] = rqst.pids[i]; in LogFilterFromOutputRqst()
468 (void)strncpy_s(filter.regex, MAX_REGEX_STR_LEN, rqst.regex, MAX_REGEX_STR_LEN - 1); in LogFilterFromOutputRqst()
485 void ServiceController::HandleOutputRqst(const OutputRqst &rqst) in HandleOutputRqst() argument
488 int ret = CheckOutputRqst(rqst); in HandleOutputRqst()
494 LogFilterFromOutputRqst(rqst, filter); in HandleOutputRqst()
495 int lines = rqst.headLines ? rqst.headLines : rqst.tailLines; in HandleOutputRqst()
496 int tailCount = rqst.tailLines; in HandleOutputRqst()
503 if (rqst.noBlock) { in HandleOutputRqst()
525 int ServiceController::CheckPersistStartRqst(const PersistStartRqst &rqst) in CheckPersistStartRqst() argument
528 int ret = CheckOutputRqst(rqst.outputFilter); in CheckPersistStartRqst()
532 if (rqst.jobId && (rqst.jobId < JOB_ID_MIN || rqst.jobId == JOB_ID_MAX)) { in CheckPersistStartRqst()
535 if (rqst.fileSize && (rqst.fileSize < MIN_LOG_FILE_SIZE || rqst.fileSize > MAX_LOG_FILE_SIZE)) { in CheckPersistStartRqst()
538 if (rqst.fileName[0] && IsValidFileName(rqst.fileName) == false) { in CheckPersistStartRqst()
541 if (rqst.fileNum && (rqst.fileNum > MAX_LOG_FILE_NUM || rqst.fileNum < MIN_LOG_FILE_NUM)) { in CheckPersistStartRqst()
547 void ServiceController::PersistStartRqst2Msg(const PersistStartRqst &rqst, LogPersistStartMsg &msg) in PersistStartRqst2Msg() argument
549 LogFilterFromOutputRqst(rqst.outputFilter, msg.filter); in PersistStartRqst2Msg()
550 bool isKmsgType = rqst.outputFilter.types == (0b01 << LOG_KMSG); in PersistStartRqst2Msg()
551 msg.compressAlg = LogCompress::Str2CompressType(rqst.stream); in PersistStartRqst2Msg()
552 msg.fileSize = rqst.fileSize == 0 ? DEFAULT_PERSIST_FILE_SIZE : rqst.fileSize; in PersistStartRqst2Msg()
553 msg.fileNum = rqst.fileNum == 0 ? DEFAULT_PERSIST_FILE_NUM : rqst.fileNum; in PersistStartRqst2Msg()
554 msg.jobId = rqst.jobId; in PersistStartRqst2Msg()
558 string fileName = rqst.fileName; in PersistStartRqst2Msg()
580 void ServiceController::HandlePersistStartRqst(const PersistStartRqst &rqst) in HandlePersistStartRqst() argument
593 ret = CheckPersistStartRqst(rqst); in HandlePersistStartRqst()
605 PersistStartRqst2Msg(rqst, msg); in HandlePersistStartRqst()
617 void ServiceController::HandlePersistStopRqst(const PersistStopRqst &rqst) in HandlePersistStopRqst() argument
622 if (rqst.jobId == 0 && resultList.empty()) { in HandlePersistStopRqst()
628 if (rqst.jobId == 0 || rqst.jobId == jobId) { in HandlePersistStopRqst()
642 void ServiceController::HandlePersistQueryRqst(const PersistQueryRqst& rqst) in HandlePersistQueryRqst() argument
666 void ServiceController::HandleBufferSizeGetRqst(const BufferSizeGetRqst& rqst) in HandleBufferSizeGetRqst() argument
669 uint16_t types = rqst.types; in HandleBufferSizeGetRqst()
689 void ServiceController::HandleBufferSizeSetRqst(const BufferSizeSetRqst& rqst) in HandleBufferSizeSetRqst() argument
692 uint16_t types = rqst.types; in HandleBufferSizeSetRqst()
700 int ret = m_hilogBuffer.SetBuffLen(t, rqst.size); in HandleBufferSizeSetRqst()
704 SetBufferSize(t, true, rqst.size); in HandleBufferSizeSetRqst()
705 rsp.size[t] = rqst.size; in HandleBufferSizeSetRqst()
718 void ServiceController::HandleStatsQueryRqst(const StatsQueryRqst& rqst) in HandleStatsQueryRqst() argument
741 void ServiceController::HandleStatsClearRqst(const StatsClearRqst& rqst) in HandleStatsClearRqst() argument
749 void ServiceController::HandleDomainFlowCtrlRqst(const DomainFlowCtrlRqst& rqst) in HandleDomainFlowCtrlRqst() argument
751 SetDomainSwitchOn(rqst.on); in HandleDomainFlowCtrlRqst()
752 m_logCollector.SetLogFlowControl(rqst.on); in HandleDomainFlowCtrlRqst()
759 void ServiceController::HandleLogRemoveRqst(const LogRemoveRqst& rqst) in HandleLogRemoveRqst() argument
762 uint16_t types = rqst.types; in HandleLogRemoveRqst()
782 void ServiceController::HandleLogKmsgEnableRqst(const KmsgEnableRqst& rqst) in HandleLogKmsgEnableRqst() argument
784 SetKmsgSwitchOn(rqst.on); in HandleLogKmsgEnableRqst()
787 if (rqst.on) { in HandleLogKmsgEnableRqst()
821 RequestHandler<OutputRqst>(hdr, [this](const OutputRqst& rqst) { in CommunicationLoop() argument
822 HandleOutputRqst(rqst); in CommunicationLoop()
827 RequestHandler<PersistStartRqst>(hdr, [this](const PersistStartRqst& rqst) { in CommunicationLoop() argument
828 HandlePersistStartRqst(rqst); in CommunicationLoop()
833 RequestHandler<PersistStopRqst>(hdr, [this](const PersistStopRqst& rqst) { in CommunicationLoop() argument
834 HandlePersistStopRqst(rqst); in CommunicationLoop()
839 RequestHandler<PersistQueryRqst>(hdr, [this](const PersistQueryRqst& rqst) { in CommunicationLoop() argument
840 HandlePersistQueryRqst(rqst); in CommunicationLoop()
845 RequestHandler<BufferSizeGetRqst>(hdr, [this](const BufferSizeGetRqst& rqst) { in CommunicationLoop() argument
846 HandleBufferSizeGetRqst(rqst); in CommunicationLoop()
851 RequestHandler<BufferSizeSetRqst>(hdr, [this](const BufferSizeSetRqst& rqst) { in CommunicationLoop() argument
852 HandleBufferSizeSetRqst(rqst); in CommunicationLoop()
857 RequestHandler<StatsQueryRqst>(hdr, [this](const StatsQueryRqst& rqst) { in CommunicationLoop() argument
858 HandleStatsQueryRqst(rqst); in CommunicationLoop()
863 RequestHandler<StatsClearRqst>(hdr, [this](const StatsClearRqst& rqst) { in CommunicationLoop() argument
864 HandleStatsClearRqst(rqst); in CommunicationLoop()
869 RequestHandler<DomainFlowCtrlRqst>(hdr, [this](const DomainFlowCtrlRqst& rqst) { in CommunicationLoop() argument
870 HandleDomainFlowCtrlRqst(rqst); in CommunicationLoop()
875 RequestHandler<LogRemoveRqst>(hdr, [this](const LogRemoveRqst& rqst) { in CommunicationLoop() argument
876 HandleLogRemoveRqst(rqst); in CommunicationLoop()
881 RequestHandler<KmsgEnableRqst>(hdr, [this](const KmsgEnableRqst& rqst) { in CommunicationLoop() argument
882 HandleLogKmsgEnableRqst(rqst); in CommunicationLoop()