Skip to content
Snippets Groups Projects
Commit 782414a8 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

sipcall: use unique_ptr instead of raw pointer

Rationale: This changes nothing functionally but since unique
pointers have stricter semantics than raw pointers, it avoids
future mis-use.

Refs #51555

Change-Id: I8ee8b64a220df07af25ae760b50dfcc731fed4b9
parent 95680fe0
No related branches found
No related tags found
No related merge requests found
...@@ -110,7 +110,8 @@ SIPCall::SIPCall(const std::string& id, Call::CallType type, ...@@ -110,7 +110,8 @@ SIPCall::SIPCall(const std::string& id, Call::CallType type,
SIPCall::~SIPCall() SIPCall::~SIPCall()
{ {
delete local_sdp_; // local sdp must be destroyed before pool
local_sdp_.reset();
pj_pool_release(pool_); pj_pool_release(pool_);
} }
......
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
#include "pjsip/sip_config.h" #include "pjsip/sip_config.h"
#include <memory>
struct pjsip_evsub; struct pjsip_evsub;
struct pj_caching_pool; struct pj_caching_pool;
struct pj_pool_t; struct pj_pool_t;
...@@ -202,7 +204,7 @@ class SIPCall : public Call { ...@@ -202,7 +204,7 @@ class SIPCall : public Call {
/** /**
* The SDP session * The SDP session
*/ */
Sdp* local_sdp_; std::unique_ptr<Sdp> local_sdp_;
char contactBuffer_[PJSIP_MAX_URL_SIZE]; char contactBuffer_[PJSIP_MAX_URL_SIZE];
pj_str_t contactHeader_; pj_str_t contactHeader_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment