From: Tzafrir Cohen Date: Mon, 22 Apr 2019 15:02:23 +0000 (+0300) Subject: openr2(1/6): bugfix in configuration saving X-Git-Tag: 13.29.0-rc1~38^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8bf4b160857e717ea94d3ef0f70296f919ae5f9;p=thirdparty%2Fasterisk.git openr2(1/6): bugfix in configuration saving Details: - The memcpy() call copied part of "dahdi_conf" and not "dahdi_conf.mfcr2" - As a result, the memcmp() in dahdi_r2_get_link() always fails - This cause dahdi_r2_get_link() to create new link for every channel (instead of a new link for every ~30 channels) - With the fix, far less links are generated -- so we use far less threads Change-Id: I7259dd6272f5e46e8a6c7f5bf3e8c2ec01b8c132 Signed-off-by: Oron Peled --- diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 1f83f02aad..fb633073f4 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -11992,7 +11992,7 @@ static int dahdi_r2_set_context(struct dahdi_mfcr2 *r2_link, const struct dahdi_ } } /* Save the configuration used to setup this link */ - memcpy(&r2_link->conf, conf, sizeof(r2_link->conf)); + memcpy(&r2_link->conf, &conf->mfcr2, sizeof(r2_link->conf)); return 0; } #endif