|Subject||Re: [firebird-support] new trace API question: how to get trace session|
> Vlad,To stop own trace session it is enough to detach from service manager. Since there
>>> To control a trace session you need its numerical ID.
>> What do you mean - "control a trace session" ?
>>> But how do I get it? isc_action_svc_trace_start mentions nothing about a session ID.
>> isc_action_svc_trace_list is your friend
> Had to rethink that a bit. I think, returning the session ID when
> calling isc_action_svc_trace_start is useful. Imagine the following:
> 1) Client app starts a trace session
> 2) Nothing happened so far on the trace, so there is nothing returned
> when querying the service query output
> 3) Client app wants to stop the created trace session. At this time, the
> client doesn't know anything about the trace session id from the server
> from step 1).
is no support for service connections in new fb_cancel_operation() API i recommend
(and uses in fbtracemgr) to specify timeout in isc_service_query() call and test for
boolean "stop trace" flag which is set in GUI.
You can see how i did it :
look for TraceSvcUtil::runService() method and feel free to ask for explanations if
m_stop is boolean flag, set in Ctrl+C handler
no_data is sign that our trace session was stopped by someone else.
Hope this helps,