From ee4168098d5da2fb3600dfe90b793f8acf1231f9 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 6 Apr 2012 10:22:24 +0200 Subject: [PATCH] Fix audio-codec-disable command --- daemon/daemon.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/daemon.cc b/daemon/daemon.cc index 43f4ee4d4..ad97f1e65 100644 --- a/daemon/daemon.cc +++ b/daemon/daemon.cc @@ -546,12 +546,12 @@ public: DaemonCommand("audio-codec-disable", "audio-codec-disable ", "Disable an audio codec.") { } virtual void exec(Daemon *app, const char *args) { - char mime[64]; - if (sscanf(args, "%63s", mime) == 1) { + int payload_type; + if (sscanf(args, "%d", &payload_type) == 1) { int index = 0; for (const MSList *node = linphone_core_get_audio_codecs(app->getCore()); node != NULL; node = ms_list_next(node)) { PayloadType *payload = reinterpret_cast(node->data); - if (strcmp(mime, payload->mime_type) == 0) { + if (payload_type == linphone_core_get_payload_type_number(app->getCore(), payload)) { linphone_core_enable_payload_type(app->getCore(), payload, false); app->sendResponse(PayloadTypeResponse(app->getCore(), payload, index)); return;