return AST_BRIDGE_FAILED;
}
/* Put them in native bridge mode */
- if (!flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1)) {
+ if ((!flags) & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1)) {
iaxs[callno0]->bridgecallno = callno1;
iaxs[callno1]->bridgecallno = callno0;
}
{
int res;
int dlen = 0;
+ int *bufaddr;
struct pollfd fds[1];
fds[0].fd = s->fd;
return -1;
}
- dlen = letohl(*(int *)s->inbuf);
+ bufaddr = (int *)s->inbuf;
+ dlen = letohl(*bufaddr);
if (dlen < 4) {
ast_debug(1, "Skinny Client sent invalid data.\n");
ast_mutex_unlock(&s->lock);
if (dlen+8 > sizeof(s->inbuf)) {
dlen = sizeof(s->inbuf) - 8;
}
- *(int *)s->inbuf = htolel(dlen);
+ *bufaddr = htolel(dlen);
res = read(s->fd, s->inbuf+4, dlen+4);
ast_mutex_unlock(&s->lock);
static struct skinny_req *skinny_req_parse(struct skinnysession *s)
{
struct skinny_req *req;
+ int *bufaddr;
if (!(req = ast_calloc(1, SKINNY_MAX_PACKET)))
return NULL;
ast_mutex_lock(&s->lock);
memcpy(req, s->inbuf, skinny_header_size);
- memcpy(&req->data, s->inbuf+skinny_header_size, letohl(*(int*)(s->inbuf))-4);
+ bufaddr = (int *)(s->inbuf);
+ memcpy(&req->data, s->inbuf+skinny_header_size, letohl(*bufaddr)-4);
ast_mutex_unlock(&s->lock);
destination format. */
for (x = 1; src_audio && (x & AST_FORMAT_AUDIO_MASK); x <<= 1) {
/* if this is not a desired format, nothing to do */
- if (!dest & x)
+ if ((!dest) & x)
continue;
/* if the source is supplying this format, then
destination format. */
for (; src_video && (x & AST_FORMAT_VIDEO_MASK); x <<= 1) {
/* if this is not a desired format, nothing to do */
- if (!dest & x)
+ if ((!dest) & x)
continue;
/* if the source is supplying this format, then