init soap to null in constructor. Stop analysis thread before destroying soap.
This commit is contained in:
parent
c8bc0661b1
commit
dc975daa7a
|
@ -423,7 +423,8 @@ Monitor::Monitor()
|
||||||
green_val(0),
|
green_val(0),
|
||||||
blue_val(0),
|
blue_val(0),
|
||||||
grayscale_val(0),
|
grayscale_val(0),
|
||||||
colour_val(0)
|
colour_val(0),
|
||||||
|
soap(nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( strcmp(config.event_close_mode, "time") == 0 )
|
if ( strcmp(config.event_close_mode, "time") == 0 )
|
||||||
|
@ -1808,8 +1809,6 @@ bool Monitor::Poll() {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} //end Poll
|
} //end Poll
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Would be nice if this JUST did analysis
|
// Would be nice if this JUST did analysis
|
||||||
// This idea is that we should be analysing as close to the capture frame as possible.
|
// This idea is that we should be analysing as close to the capture frame as possible.
|
||||||
// This function should process as much as possible before returning
|
// This function should process as much as possible before returning
|
||||||
|
@ -3158,13 +3157,16 @@ int Monitor::Close() {
|
||||||
if (decoder) {
|
if (decoder) {
|
||||||
decoder->Stop();
|
decoder->Stop();
|
||||||
}
|
}
|
||||||
|
if (analysis_thread) {
|
||||||
|
analysis_thread->Stop();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WITH_GSOAP
|
#ifdef WITH_GSOAP
|
||||||
//ONVIF Teardown
|
//ONVIF Teardown
|
||||||
if (Poller) {
|
if (Poller) {
|
||||||
Poller->Stop();
|
Poller->Stop();
|
||||||
}
|
}
|
||||||
if (onvif_event_listener && soap != nullptr) {
|
if (onvif_event_listener && (soap != nullptr)) {
|
||||||
Debug(1, "Tearing Down Onvif");
|
Debug(1, "Tearing Down Onvif");
|
||||||
_wsnt__Unsubscribe wsnt__Unsubscribe;
|
_wsnt__Unsubscribe wsnt__Unsubscribe;
|
||||||
_wsnt__UnsubscribeResponse wsnt__UnsubscribeResponse;
|
_wsnt__UnsubscribeResponse wsnt__UnsubscribeResponse;
|
||||||
|
@ -3173,12 +3175,9 @@ int Monitor::Close() {
|
||||||
soap_end(soap);
|
soap_end(soap);
|
||||||
soap_free(soap);
|
soap_free(soap);
|
||||||
soap = nullptr;
|
soap = nullptr;
|
||||||
}//End ONVIF
|
} //End ONVIF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (analysis_thread) {
|
|
||||||
analysis_thread->Stop();
|
|
||||||
}
|
|
||||||
packetqueue.clear();
|
packetqueue.clear();
|
||||||
if (audio_fifo) {
|
if (audio_fifo) {
|
||||||
delete audio_fifo;
|
delete audio_fifo;
|
||||||
|
|
|
@ -256,18 +256,6 @@ protected:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
//ONVIF
|
|
||||||
#ifdef WITH_GSOAP
|
|
||||||
struct soap *soap;
|
|
||||||
bool ONVIF_Trigger_State;
|
|
||||||
bool ONVIF_Healthy;
|
|
||||||
_tev__CreatePullPointSubscription request;
|
|
||||||
_tev__CreatePullPointSubscriptionResponse response;
|
|
||||||
_tev__PullMessages tev__PullMessages;
|
|
||||||
_tev__PullMessagesResponse tev__PullMessagesResponse;
|
|
||||||
PullPointSubscriptionBindingProxy proxyEvent;
|
|
||||||
void set_credentials(struct soap *soap);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// These are read from the DB and thereafter remain unchanged
|
// These are read from the DB and thereafter remain unchanged
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
|
@ -451,6 +439,18 @@ protected:
|
||||||
Rgb colour_val; /* RGB32 color */
|
Rgb colour_val; /* RGB32 color */
|
||||||
int usedsubpixorder;
|
int usedsubpixorder;
|
||||||
|
|
||||||
|
//ONVIF
|
||||||
|
#ifdef WITH_GSOAP
|
||||||
|
struct soap *soap;
|
||||||
|
bool ONVIF_Trigger_State;
|
||||||
|
bool ONVIF_Healthy;
|
||||||
|
_tev__CreatePullPointSubscription request;
|
||||||
|
_tev__CreatePullPointSubscriptionResponse response;
|
||||||
|
_tev__PullMessages tev__PullMessages;
|
||||||
|
_tev__PullMessagesResponse tev__PullMessagesResponse;
|
||||||
|
PullPointSubscriptionBindingProxy proxyEvent;
|
||||||
|
void set_credentials(struct soap *soap);
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
explicit Monitor();
|
explicit Monitor();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue