From e8ad3f64550ca8249714b440916c64c7f413888f Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Mon, 20 Jul 2009 11:03:49 +0000 Subject: [PATCH] - don't try to send MANUFACTURER_REQ for DIVA if vendor is not Eicon/Dialogic. --- chan_capi_utils.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/chan_capi_utils.c b/chan_capi_utils.c index 47e56c8..266f554 100644 --- a/chan_capi_utils.c +++ b/chan_capi_utils.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include "chan_capi_platform.h" #include "xlaw.h" @@ -1086,8 +1087,19 @@ unsigned capi_ManufacturerAllowOnController(unsigned controller) { MESSAGE_EXCHANGE_ERROR error; int waitcount = 50; + unsigned char manbuf[CAPI_MANUFACTURER_LEN]; _cmsg CMSG; + if (capi20_get_manufacturer(controller, manbuf) == NULL) { + error = CapiRegOSResourceErr; + goto done; + } + if ((strstr((char *)manbuf, "Eicon") == 0) && + (strstr((char *)manbuf, "Dialogic") == 0)) { + error = 0x100F; + goto done; + } + error = capi_sendf (NULL, 0, CAPI_MANUFACTURER_REQ, controller, get_capi_MessageNumber(), "dw(d)", _DI_MANU_ID, _DI_OPTIONS_REQUEST, 0x00000020L);