fix indentation

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Luigi Rizzo 19 years ago
parent 0c8f2f1e4c
commit a63d971afc

@ -696,22 +696,24 @@ static int setformat(struct chan_oss_pvt *o, int mode)
return -1; return -1;
} }
switch (mode) { switch (mode) {
case O_RDWR: case O_RDWR:
res = ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0); res = ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0);
/* Check to see if duplex set (FreeBSD Bug) */ /* Check to see if duplex set (FreeBSD Bug) */
res = ioctl(fd, SNDCTL_DSP_GETCAPS, &fmt); res = ioctl(fd, SNDCTL_DSP_GETCAPS, &fmt);
if (res == 0 && (fmt & DSP_CAP_DUPLEX)) { if (res == 0 && (fmt & DSP_CAP_DUPLEX)) {
if (option_verbose > 1) if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Console is full duplex\n"); ast_verbose(VERBOSE_PREFIX_2 "Console is full duplex\n");
o->duplex = M_FULL; o->duplex = M_FULL;
}; };
break; break;
case O_WRONLY:
o->duplex = M_WRITE; case O_WRONLY:
break; o->duplex = M_WRITE;
case O_RDONLY: break;
o->duplex = M_READ;
break; case O_RDONLY:
o->duplex = M_READ;
break;
} }
fmt = 0; fmt = 0;
@ -949,32 +951,34 @@ static int oss_indicate(struct ast_channel *c, int cond, const void *data, size_
int res = -1; int res = -1;
switch (cond) { switch (cond) {
case AST_CONTROL_BUSY: case AST_CONTROL_BUSY:
case AST_CONTROL_CONGESTION: case AST_CONTROL_CONGESTION:
case AST_CONTROL_RINGING: case AST_CONTROL_RINGING:
res = cond; res = cond;
break; break;
case -1: case -1:
o->cursound = -1; o->cursound = -1;
o->nosound = 0; /* when cursound is -1 nosound must be 0 */ o->nosound = 0; /* when cursound is -1 nosound must be 0 */
return 0; return 0;
case AST_CONTROL_VIDUPDATE: case AST_CONTROL_VIDUPDATE:
res = -1; res = -1;
break; break;
case AST_CONTROL_HOLD:
ast_verbose(" << Console Has Been Placed on Hold >> \n"); case AST_CONTROL_HOLD:
ast_moh_start(c, data, o->mohinterpret); ast_verbose(" << Console Has Been Placed on Hold >> \n");
break; ast_moh_start(c, data, o->mohinterpret);
case AST_CONTROL_UNHOLD: break;
ast_verbose(" << Console Has Been Retrieved from Hold >> \n");
ast_moh_stop(c); case AST_CONTROL_UNHOLD:
break; ast_verbose(" << Console Has Been Retrieved from Hold >> \n");
ast_moh_stop(c);
default: break;
ast_log(LOG_WARNING, "Don't know how to display condition %d on %s\n", cond, c->name);
return -1; default:
ast_log(LOG_WARNING, "Don't know how to display condition %d on %s\n", cond, c->name);
return -1;
} }
if (res > -1) if (res > -1)

Loading…
Cancel
Save