- don't try to send MANUFACTURER_REQ for DIVA if vendor is not Eicon/Dialogic.

This commit is contained in:
MelwareDE 2009-07-20 11:03:49 +00:00
parent ea1a3414bf
commit e8ad3f6455
1 changed files with 12 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <sys/types.h>
#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);