Skip to content
Snippets Groups Projects
Commit 5aac826b authored by Philippe Gorley's avatar Philippe Gorley Committed by Guillaume Roguez
Browse files

fix compilation warnings


Change-Id: I1293f52e9b5255d30faf2dd4c2537831ff05062d
Reviewed-by: default avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
parent 5f13f843
No related branches found
No related tags found
No related merge requests found
...@@ -153,6 +153,7 @@ class HasInvariants ...@@ -153,6 +153,7 @@ class HasInvariants
public: public:
/// Reimplement to specify the invariants. /// Reimplement to specify the invariants.
virtual bool invariants() const = 0; virtual bool invariants() const = 0;
virtual ~HasInvariants() = 0;
}; };
/// Scope guard for invariant check in a class derived from HasInvariants. /// Scope guard for invariant check in a class derived from HasInvariants.
......
...@@ -94,19 +94,14 @@ dtmfSend(SIPCall &call, char code, const std::string &dtmf) ...@@ -94,19 +94,14 @@ dtmfSend(SIPCall &call, char code, const std::string &dtmf)
int duration = Manager::instance().voipPreferences.getPulseLength(); int duration = Manager::instance().voipPreferences.getPulseLength();
char dtmf_body[1000]; char dtmf_body[1000];
const char *normal_str= "Signal=%c\r\nDuration=%d\r\n";
const char *flash_str = "Signal=%d\r\nDuration=%d\r\n";
const char *str;
// handle flash code // handle flash code
if (code == '!') { if (code == '!') {
str = flash_str; snprintf(dtmf_body, sizeof dtmf_body - 1, "Signal=16\r\nDuration=%d\r\n", duration);
code = 16;
} else { } else {
str = normal_str; snprintf(dtmf_body, sizeof dtmf_body - 1, "Signal=%c\r\nDuration=%d\r\n", code, duration);
} }
snprintf(dtmf_body, sizeof dtmf_body - 1, str, code, duration);
call.sendSIPInfo(dtmf_body, "dtmf-relay"); call.sendSIPInfo(dtmf_body, "dtmf-relay");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment