Commit 5aac826b authored by Philippe Gorley's avatar Philippe Gorley Committed by Guillaume Roguez

fix compilation warnings

Change-Id: I1293f52e9b5255d30faf2dd4c2537831ff05062d
Reviewed-by: Guillaume Roguez's avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
parent 5f13f843
......@@ -153,6 +153,7 @@ class HasInvariants
public:
/// Reimplement to specify the invariants.
virtual bool invariants() const = 0;
virtual ~HasInvariants() = 0;
};
/// Scope guard for invariant check in a class derived from HasInvariants.
......
......@@ -94,19 +94,14 @@ dtmfSend(SIPCall &call, char code, const std::string &dtmf)
int duration = Manager::instance().voipPreferences.getPulseLength();
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
if (code == '!') {
str = flash_str;
code = 16;
snprintf(dtmf_body, sizeof dtmf_body - 1, "Signal=16\r\nDuration=%d\r\n", duration);
} 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");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment