Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

muted.c File Reference

#include <linux/soundcard.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <arpa/inet.h>

Include dependency graph for muted.c:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  subchannel
struct  channel

Functions

int main (int argc, char *argv[])


Function Documentation

int main int  argc,
char *  argv[]
 

Definition at line 503 of file muted.c.

00504 { 00505 int x; 00506 while((x = getopt(argc, argv, "fhd")) > 0) { 00507 switch(x) { 00508 case 'd': 00509 debug = 1; 00510 needfork = 0; 00511 break; 00512 case 'f': 00513 needfork = 0; 00514 break; 00515 case 'h': 00516 /* Fall through */ 00517 default: 00518 usage(); 00519 exit(1); 00520 } 00521 } 00522 if (load_config()) 00523 exit(1); 00524 if (open_mixer()) 00525 exit(1); 00526 if (connect_asterisk()) { 00527 close(mixfd); 00528 exit(1); 00529 } 00530 if (login_asterisk()) { 00531 close(mixfd); 00532 fclose(astf); 00533 exit(1); 00534 } 00535 if (needfork) 00536 daemon(0,0); 00537 for(;;) { 00538 if (wait_event()) 00539 exit(1); 00540 } 00541 exit(0); 00542 }


Generated on Sat Jun 12 16:41:42 2004 for Asterisk by doxygen 1.3.7