nsmcp::LogService method resolveWindow (public)

 <instance of nsmcp::LogService[i]> resolveWindow context handle

Defined in /usr/local/ns/tcl/nsmcp/lib/log-tools.tcl

Parameters:
context (required)
handle (required)

Testcases:
No testcase defined.
Source code:
:require $context
ns_mutex lock ${:mutex}
try {
    foreach key [nsv_array names ${:store}] {
        set record [nsv_get ${:store} $key]
        if {![:owned $context $record]} continue
        if {[dict exists $record windowHandle] && [dict get $record windowHandle] eq $handle} {return [dict get $record window]}
        if {$key eq $handle} {return -code error -errorcode {NSMCP RPC -32602} "This is a jobHandle; use its windowHandle for access_summary"}
        if {[dict exists $record mappings $handle]} {return -code error -errorcode {NSMCP RPC -32602} "This is a resultHandle; use it with log_results, not access_summary"}
    }
    return -code error -errorcode {NSMCP RPC -32602} "Unknown or expired windowHandle; start a new interval"
} finally {ns_mutex unlock ${:mutex}}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: