From f7ee12a78de22a1f8e503947342db3f14a348bd0 Mon Sep 17 00:00:00 2001 From: "Infineon\\StieberD" Date: Wed, 30 Jul 2025 09:48:56 -0700 Subject: [PATCH] Fixed a bug where the ProcessProcedureQueue service would write an invalid record to the PROC_QUEUE2 table when failing to read a record. --- LSL2/STPROC/SERVICE_SERVICES.txt | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/LSL2/STPROC/SERVICE_SERVICES.txt b/LSL2/STPROC/SERVICE_SERVICES.txt index c3d8103..014371f 100644 --- a/LSL2/STPROC/SERVICE_SERVICES.txt +++ b/LSL2/STPROC/SERVICE_SERVICES.txt @@ -182,27 +182,27 @@ Service ProcessProcedureQueue() Loop ReadNext RequestKeyID else EOF = True$ Until EOF - SendRequest = True$ Read RequestRec from hProcQueue, RequestKeyID then - InQueue = RequestRec + SendRequest = True$ + InQueue = RequestRec If InQueue then QueuedDtm = RequestRec If QueuedDtm GT SRP_Datetime('AddMinutes', Datetime(), -10) then SendRequest = False$ end end - end - If SendRequest then - TcpClientHandle = 0 - If SRP_TcpClient(TcpClientHandle, 'CONNECT', ServerIP, ServerPort) then - RequestRec = True$ - RequestRec = Datetime() - Write RequestRec on hProcQueue, RequestKeyID then - Command = 'RUN SERVICE_SERVICES "ProcessRequest", ':Quote(RequestKeyID) - SRP_TcpClient(TcpClientHandle, 'SEND_SES', Command) - end - SRP_TcpClient(TcpClientHandle, 'CLOSE_SES') - end + If SendRequest then + TcpClientHandle = 0 + If SRP_TcpClient(TcpClientHandle, 'CONNECT', ServerIP, ServerPort) then + RequestRec = True$ + RequestRec = Datetime() + Write RequestRec on hProcQueue, RequestKeyID then + Command = 'RUN SERVICE_SERVICES "ProcessRequest", ':Quote(RequestKeyID) + SRP_TcpClient(TcpClientHandle, 'SEND_SES', Command) + end + SRP_TcpClient(TcpClientHandle, 'CLOSE_SES') + end + end end Repeat end @@ -474,4 +474,3 @@ end service /// Internal GoSubs //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -