Index: asterisk.c =================================================================== RCS file: /usr/cvsroot/asterisk/asterisk.c,v retrieving revision 1.50 diff -u -r1.50 asterisk.c --- asterisk.c 23 Jan 2004 19:12:44 -0000 1.50 +++ asterisk.c 27 Jan 2004 17:13:51 -0000 @@ -1232,7 +1232,7 @@ int main(int argc, char *argv[]) { - char c; + int c; char filename[80] = ""; char hostname[256]; char tmp[80]; @@ -1269,7 +1269,7 @@ } */ /* Check for options */ - while((c=getopt(argc, argv, "hfdvqprgcinx:C:")) != EOF) { + while((c=getopt(argc, argv, "hfdvqprgcinx:C:")) != -1) { switch(c) { case 'd': option_debug++; Index: indications.c =================================================================== RCS file: /usr/cvsroot/asterisk/indications.c,v retrieving revision 1.6 diff -u -r1.6 indications.c --- indications.c 8 Jan 2004 15:47:16 -0000 1.6 +++ indications.c 27 Jan 2004 17:14:00 -0000 @@ -235,7 +235,8 @@ if (country) { struct tone_zone *z = ast_get_indication_zone(country); if (z) { - ast_verbose(VERBOSE_PREFIX_3 "Setting default indication country to '%s'\n",country); + if (option_verbose > 2) + ast_verbose(VERBOSE_PREFIX_3 "Setting default indication country to '%s'\n",country); current_tonezone = z; return 0; } @@ -359,7 +360,8 @@ tone_zones = zone; ast_mutex_unlock(&tzlock); - ast_verbose(VERBOSE_PREFIX_3 "Registered indication country '%s'\n",zone->country); + if (option_verbose > 2) + ast_verbose(VERBOSE_PREFIX_3 "Registered indication country '%s'\n",zone->country); return 0; } @@ -390,7 +392,8 @@ ast_log(LOG_NOTICE,"Removed default indication country '%s'\n",tz->country); current_tonezone = NULL; } - ast_verbose(VERBOSE_PREFIX_3 "Unregistered indication country '%s'\n",tz->country); + if (option_verbose > 2) + ast_verbose(VERBOSE_PREFIX_3 "Unregistered indication country '%s'\n",tz->country); free_zone(tz); tz = tmp; res = 0; Index: apps/app_qcall.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_qcall.c,v retrieving revision 1.7 diff -u -r1.7 app_qcall.c --- apps/app_qcall.c 22 Aug 2003 16:36:33 -0000 1.7 +++ apps/app_qcall.c 27 Jan 2004 17:14:02 -0000 @@ -338,7 +338,7 @@ strcpy(channel->exten,extstr); strcpy(channel->context,context); channel->priority = 1; - printf("Caller ID is %s\n", channel->callerid); + if(debug) printf("Caller ID is %s\n", channel->callerid); ast_pbx_run(channel); pthread_exit(NULL); } Index: apps/app_queue.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v retrieving revision 1.40 diff -u -r1.40 app_queue.c --- apps/app_queue.c 19 Nov 2003 21:56:45 -0000 1.40 +++ apps/app_queue.c 27 Jan 2004 17:14:05 -0000 @@ -1131,8 +1131,9 @@ } } } - printf("queue: %s, options: %s, url: %s, announce: %s\n", - queuename, options, url, announceoverride); + if (option_debug) + ast_log(LOG_DEBUG, "queue: %s, options: %s, url: %s, announce: %s\n", + queuename, options, url, announceoverride); /* Setup our queue entry */ memset(&qe, 0, sizeof(qe)); qe.chan = chan; Index: formats/format_g729.c =================================================================== RCS file: /usr/cvsroot/asterisk/formats/format_g729.c,v retrieving revision 1.8 diff -u -r1.8 format_g729.c --- formats/format_g729.c 22 Jan 2004 21:30:04 -0000 1.8 +++ formats/format_g729.c 27 Jan 2004 17:14:10 -0000 @@ -150,12 +150,12 @@ ast_log(LOG_WARNING, "Asked to write non-G729 frame (%d)!\n", f->subclass); return -1; } - if (f->datalen % 20) { - ast_log(LOG_WARNING, "Invalid data length, %d, should be multiple of 20\n", f->datalen); + if (f->datalen % 10) { + ast_log(LOG_WARNING, "Invalid data length, %d, should be multiple of 10\n", f->datalen); return -1; } if ((res = write(fs->fd, f->data, f->datalen)) != f->datalen) { - ast_log(LOG_WARNING, "Bad write (%d/20): %s\n", res, strerror(errno)); + ast_log(LOG_WARNING, "Bad write (%d/10): %s\n", res, strerror(errno)); return -1; } return 0; Index: pbx/pbx_spool.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx/pbx_spool.c,v retrieving revision 1.4 diff -u -r1.4 pbx_spool.c --- pbx/pbx_spool.c 1 Oct 2003 21:01:31 -0000 1.4 +++ pbx/pbx_spool.c 27 Jan 2004 17:14:11 -0000 @@ -339,8 +339,7 @@ pthread_t thread; pthread_attr_t attr; snprintf((char *)qdir,sizeof(qdir)-1,"%s/%s",(char *)ast_config_AST_SPOOL_DIR,"outgoing"); -printf("%s\n",qdir); - if (mkdir(qdir, 0700) && (errno != EEXIST)) { + if (mkdir(qdir, 0700) && (errno != EEXIST)) { ast_log(LOG_WARNING, "Unable to create queue directory %s -- outgoing spool disabled\n", qdir); return 0; } Index: pbx/pbx_wilcalu.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx/pbx_wilcalu.c,v retrieving revision 1.10 diff -u -r1.10 pbx_wilcalu.c --- pbx/pbx_wilcalu.c 29 Sep 2003 21:35:19 -0000 1.10 +++ pbx/pbx_wilcalu.c 27 Jan 2004 17:28:06 -0000 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -62,7 +63,8 @@ int flags = fcntl(fd, F_GETFL); fd_set fds; fcntl(fd, F_SETFL, flags & ~O_NONBLOCK); - ast_log(LOG_DEBUG, "Entered Wil-Calu fd=%d\n",fd); + if (option_debug) + ast_log(LOG_DEBUG, "Entered Wil-Calu fd=%d\n",fd); if(fd<0) { ast_log(LOG_WARNING, "Autodial: Unable to open file\n"); pthread_exit(NULL);