Index: cdr.c =================================================================== RCS file: /usr/cvsroot/asterisk/cdr.c,v retrieving revision 1.46 diff -u -r1.46 cdr.c --- cdr.c 20 Jun 2005 23:37:01 -0000 1.46 +++ cdr.c 7 Jul 2005 12:03:15 -0000 @@ -1052,10 +1052,10 @@ nextbatchtime = ast_sched_when(sched, cdr_sched); ast_cli(fd, "CDR safe shut down: %s\n", batchsafeshutdown ? "enabled" : "disabled"); ast_cli(fd, "CDR batch threading model: %s\n", batchscheduleronly ? "scheduler only" : "scheduler plus separate threads"); - ast_cli(fd, "CDR current batch size: %d record(s)\n", cnt); - ast_cli(fd, "CDR maximum batch size: %d record(s)\n", batchsize); - ast_cli(fd, "CDR maximum batch time: %d second(s)\n", batchtime); - ast_cli(fd, "CDR next scheduled batch processing time: %ld second(s)\n", nextbatchtime); + ast_cli(fd, "CDR current batch size: %d record%s\n", cnt, (cnt != 1) ? "s" : ""); + ast_cli(fd, "CDR maximum batch size: %d record%s\n", batchsize, (batchsize != 1) ? "s" : ""); + ast_cli(fd, "CDR maximum batch time: %d second%s\n", batchtime, (batchtime != 1) ? "s" : ""); + ast_cli(fd, "CDR next scheduled batch processing time: %ld second%s\n", nextbatchtime, (nextbatchtime != 1) ? "s" : ""); } AST_LIST_LOCK(&be_list); AST_LIST_TRAVERSE(&be_list, beitem, list) { Index: cli.c =================================================================== RCS file: /usr/cvsroot/asterisk/cli.c,v retrieving revision 1.88 diff -u -r1.88 cli.c --- cli.c 10 Jun 2005 20:25:23 -0000 1.88 +++ cli.c 7 Jul 2005 12:03:15 -0000 @@ -430,11 +430,11 @@ ast_mutex_unlock(&c->lock); } if(!concise) { - ast_cli(fd, "%d active channel(s)\n", numchans); + ast_cli(fd, "%d active channel%s\n", numchans, (numchans!=1) ? "s" : ""); if (option_maxcalls) - ast_cli(fd, "%d of %d max active call(s) (%5.2f%% of capacity)\n", ast_active_calls(), option_maxcalls, ((float)ast_active_calls() / (float)option_maxcalls) * 100.0); + ast_cli(fd, "%d of %d max active call%s (%5.2f%% of capacity)\n", ast_active_calls(), option_maxcalls, (ast_active_calls()!=1) ? "s" : "", ((float)ast_active_calls() / (float)option_maxcalls) * 100.0); else - ast_cli(fd, "%d active call(s)\n", ast_active_calls()); + ast_cli(fd, "%d active call%s\n", ast_active_calls(), (ast_active_calls()!=1) ? "s" : ""); } return RESULT_SUCCESS; } Index: loader.c =================================================================== RCS file: /usr/cvsroot/asterisk/loader.c,v retrieving revision 1.47 diff -u -r1.47 loader.c --- loader.c 5 Jul 2005 22:11:42 -0000 1.47 +++ loader.c 7 Jul 2005 12:03:15 -0000 @@ -365,7 +365,7 @@ errors++; } if (errors) { - ast_log(LOG_WARNING, "%d error(s) loading module %s, aborted\n", errors, fn); + ast_log(LOG_WARNING, "%d error%s loading module %s, aborted\n", errors, (errors != 1) ? "s" : "", fn); dlclose(m->lib); free(m); ast_mutex_unlock(&modlock); Index: apps/app_groupcount.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_groupcount.c,v retrieving revision 1.17 diff -u -r1.17 app_groupcount.c --- apps/app_groupcount.c 6 Jun 2005 22:39:31 -0000 1.17 +++ apps/app_groupcount.c 7 Jul 2005 12:03:17 -0000 @@ -202,7 +202,7 @@ if (havepattern) regfree(®exbuf); - ast_cli(fd, "%d active channel(s)\n", numchans); + ast_cli(fd, "%d active channel%s\n", numchans, (numchans != 1) ? "s" : ""); return RESULT_SUCCESS; } Index: apps/app_read.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_read.c,v retrieving revision 1.20 diff -u -r1.20 app_read.c --- apps/app_read.c 6 Jun 2005 22:39:31 -0000 1.20 +++ apps/app_read.c 7 Jul 2005 12:03:19 -0000 @@ -159,7 +159,7 @@ tries--; if (option_verbose > 2) { if (tries) - ast_verbose(VERBOSE_PREFIX_3 "User entered nothing, %d chance(s) left\n", tries); + ast_verbose(VERBOSE_PREFIX_3 "User entered nothing, %d chance%s left\n", tries, (tries != 1) ? "s" : ""); else ast_verbose(VERBOSE_PREFIX_3 "User entered nothing.\n"); } Index: apps/app_realtime.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_realtime.c,v retrieving revision 1.10 diff -u -r1.10 app_realtime.c --- apps/app_realtime.c 6 Jun 2005 22:39:31 -0000 1.10 +++ apps/app_realtime.c 7 Jul 2005 12:03:19 -0000 @@ -92,7 +92,7 @@ return RESULT_SUCCESS; } - ast_cli(fd, "Updated %d RealTime record(s).\n", res); + ast_cli(fd, "Updated %d RealTime record%s.\n", res, (res != 1) ? "s" : ""); return RESULT_SUCCESS; } Index: channels/chan_iax2.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v retrieving revision 1.314 diff -u -r1.314 chan_iax2.c --- channels/chan_iax2.c 24 Jun 2005 04:38:59 -0000 1.314 +++ channels/chan_iax2.c 7 Jul 2005 12:03:20 -0000 @@ -4348,7 +4348,7 @@ } ast_mutex_unlock(&iaxsl[x]); } - ast_cli(fd, "%d active IAX channel(s)\n", numchans); + ast_cli(fd, "%d active IAX channel%s\n", numchans, (numchans != 1) ? "s" : ""); return RESULT_SUCCESS; #undef FORMAT #undef FORMAT2 @@ -4443,7 +4443,7 @@ ast_cli(fd, " -------- LOCAL --------------------- -------- REMOTE --------------------\n"); ast_cli(fd, "Channel RTT Jit Del Lost %% Drop OOO Kpkts Jit Del Lost %% Drop OOO Kpkts\n"); numchans = ast_cli_netstats(fd, 1); - ast_cli(fd, "%d active IAX channel(s)\n", numchans); + ast_cli(fd, "%d active IAX channel%s\n", numchans, (numchans != 1) ? "s" : ""); return RESULT_SUCCESS; } @@ -5887,7 +5887,7 @@ } else { res = send_trunk(tpeer, &now); if (iaxtrunkdebug) - ast_verbose(" - Trunk peer (%s:%d) has %d call chunk(s) in transit, %d bytes backloged and has hit a high water mark of %d bytes\n", ast_inet_ntoa(iabuf, sizeof(iabuf), tpeer->addr.sin_addr), ntohs(tpeer->addr.sin_port), res, tpeer->trunkdatalen, tpeer->trunkdataalloc); + ast_verbose(" - Trunk peer (%s:%d) has %d call chunk%s in transit, %d bytes backloged and has hit a high water mark of %d bytes\n", ast_inet_ntoa(iabuf, sizeof(iabuf), tpeer->addr.sin_addr), ntohs(tpeer->addr.sin_port), res, (res != 1) ? "s" : "", tpeer->trunkdatalen, tpeer->trunkdataalloc); } totalcalls += res; res = 0; Index: pbx/pbx_spool.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx/pbx_spool.c,v retrieving revision 1.24 diff -u -r1.24 pbx_spool.c --- pbx/pbx_spool.c 6 Jun 2005 22:12:19 -0000 1.24 +++ pbx/pbx_spool.c 7 Jul 2005 12:03:33 -0000 @@ -235,7 +235,7 @@ ast_log(LOG_NOTICE, "Call failed to go through, reason %d\n", reason); if (o->retries >= o->maxretries + 1) { /* Max retries exceeded */ - ast_log(LOG_EVENT, "Queued call to %s/%s expired without completion after %d attempt(s)\n", o->tech, o->dest, o->retries - 1); + ast_log(LOG_EVENT, "Queued call to %s/%s expired without completion after %d attempt%s\n", o->tech, o->dest, o->retries - 1, ((o->retries - 1) != 1) ? "s" : ""); unlink(o->fn); } else { /* Notate that the call is still active */ @@ -294,7 +294,7 @@ now += o->retrytime; return now; } else { - ast_log(LOG_EVENT, "Queued call to %s/%s expired without completion after %d attempt(s)\n", o->tech, o->dest, o->retries - 1); + ast_log(LOG_EVENT, "Queued call to %s/%s expired without completion after %d attempt%s\n", o->tech, o->dest, o->retries - 1, ((o->retries - 1) != 1) ? "s" : ""); free(o); unlink(fn); return 0; Index: res/res_features.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_features.c,v retrieving revision 1.58 diff -u -r1.58 res_features.c --- res/res_features.c 23 Jun 2005 22:12:01 -0000 1.58 +++ res/res_features.c 7 Jul 2005 12:03:34 -0000 @@ -1680,7 +1680,7 @@ cur = cur->next; numparked++; } - ast_cli(fd, "%d parked call(s).\n",numparked); + ast_cli(fd, "%d parked call%s.\n", numparked, (numparked != 1) ? "s" : ""); ast_mutex_unlock(&parking_lock);