[svn-commits] seanbright: branch seanbright/resolve-shadow-warnings r125455 - in /team/sean...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 26 13:22:14 CDT 2008


Author: seanbright
Date: Thu Jun 26 13:22:13 2008
New Revision: 125455

URL: http://svn.digium.com/view/asterisk?view=rev&rev=125455
Log: (empty)

Modified:
    team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c
    team/seanbright/resolve-shadow-warnings/channels/chan_dahdi.c
    team/seanbright/resolve-shadow-warnings/channels/chan_sip.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_a_mu.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_adpcm.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_alaw.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_g722.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_g726.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_ilbc.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_lpc10.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_resample.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_speex.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_ulaw.c
    team/seanbright/resolve-shadow-warnings/include/asterisk/timing.h
    team/seanbright/resolve-shadow-warnings/include/asterisk/translate.h
    team/seanbright/resolve-shadow-warnings/main/channel.c
    team/seanbright/resolve-shadow-warnings/main/timing.c
    team/seanbright/resolve-shadow-warnings/main/translate.c
    team/seanbright/resolve-shadow-warnings/res/res_timing_dahdi.c
    team/seanbright/resolve-shadow-warnings/res/res_timing_pthread.c

Modified: team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c Thu Jun 26 13:22:13 2008
@@ -5393,7 +5393,11 @@
 					res = ast_play_and_wait(chan, "vm-messages");
 				if (!res)
 					res = ast_play_and_wait(chan, "vm-saved"); */
-				res = ast_play_and_wait(chan, "vm-msgsaved");
+
+				/* If forwarded with intro, DON'T PLAY THIS MESSAGE AGAIN! */
+				if (ast_strlen_zero(tmptxtfile)) { /* not a forwarded message with intro */
+					res = ast_play_and_wait(chan, "vm-msgsaved");
+				}
 			}	
 		}
 	}

Modified: team/seanbright/resolve-shadow-warnings/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/channels/chan_dahdi.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/channels/chan_dahdi.c (original)
+++ team/seanbright/resolve-shadow-warnings/channels/chan_dahdi.c Thu Jun 26 13:22:13 2008
@@ -1153,13 +1153,13 @@
 		bi.numbufs = numbufs;
 		res = ioctl(p->subs[x].zfd, DAHDI_SET_BUFINFO, &bi);
 		if (res < 0) {
-			ast_log(LOG_WARNING, "Unable to set buffer policy on channel %d\n", x);
+			ast_log(LOG_WARNING, "Unable to set buffer policy on channel %d: %s\n", x, strerror(errno));
 		}
 	} else 
-		ast_log(LOG_WARNING, "Unable to check buffer policy on channel %d\n", x);
+		ast_log(LOG_WARNING, "Unable to check buffer policy on channel %d: %s\n", x, strerror(errno));
 
 	if (ioctl(p->subs[x].zfd, DAHDI_CHANNO, &p->subs[x].chan) == 1) {
-		ast_log(LOG_WARNING, "Unable to get channel number for pseudo channel on FD %d\n", p->subs[x].zfd);
+		ast_log(LOG_WARNING, "Unable to get channel number for pseudo channel on FD %d: %s\n", p->subs[x].zfd, strerror(errno));
 		dahdi_close(p->subs[x].zfd);
 		p->subs[x].zfd = -1;
 		return -1;
@@ -1251,7 +1251,7 @@
 		zo.dialstr[1] = digit;
 		zo.dialstr[2] = '\0';
 		if ((res = ioctl(pvt->subs[SUB_REAL].zfd, DAHDI_DIAL, &zo)))
-			ast_log(LOG_WARNING, "Couldn't dial digit %c\n", digit);
+			ast_log(LOG_WARNING, "Couldn't dial digit %c: %s\n", digit, strerror(errno));
 		else
 			pvt->dialing = 1;
 	} else {
@@ -1462,7 +1462,7 @@
 	if (c->zfd < 0)
 		return 0;
 	if (ioctl(c->zfd, DAHDI_SETCONF, &zi)) {
-		ast_log(LOG_WARNING, "Failed to add %d to conference %d/%d\n", c->zfd, zi.confmode, zi.confno);
+		ast_log(LOG_WARNING, "Failed to add %d to conference %d/%d: %s\n", c->zfd, zi.confmode, zi.confno, strerror(errno));
 		return -1;
 	}
 	if (slavechannel < 1) {
@@ -1498,7 +1498,7 @@
 	zi.confno = 0;
 	zi.confmode = 0;
 	if (ioctl(c->zfd, DAHDI_SETCONF, &zi)) {
-		ast_log(LOG_WARNING, "Failed to drop %d from conference %d/%d\n", c->zfd, c->curconf.confmode, c->curconf.confno);
+		ast_log(LOG_WARNING, "Failed to drop %d from conference %d/%d: %s\n", c->zfd, c->curconf.confmode, c->curconf.confno, strerror(errno));
 		return -1;
 	}
 	ast_debug(1, "Removed %d from conference %d/%d\n", c->zfd, c->curconf.confmode, c->curconf.confno);
@@ -1558,7 +1558,7 @@
 	memset(&p->subs[SUB_REAL].curconf, 0, sizeof(p->subs[SUB_REAL].curconf));
 	if (p->subs[SUB_REAL].zfd > -1) {
 		if (ioctl(p->subs[SUB_REAL].zfd, DAHDI_SETCONF, &zi))
-			ast_log(LOG_WARNING, "Failed to reset conferencing on channel %d!\n", p->channel);
+			ast_log(LOG_WARNING, "Failed to reset conferencing on channel %d: %s\n", p->channel, strerror(errno));
 	}
 	return 0;
 }
@@ -1660,7 +1660,7 @@
 		x = p->echotraining;
 		res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_ECHOTRAIN, &x);
 		if (res)
-			ast_log(LOG_WARNING, "Unable to request echo training on channel %d\n", p->channel);
+			ast_log(LOG_WARNING, "Unable to request echo training on channel %d: %s\n", p->channel, strerror(errno));
 		else
 			ast_debug(1, "Engaged echo training on channel %d\n", p->channel);
 	} else {
@@ -1678,7 +1678,7 @@
 		res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_ECHOCANCEL_PARAMS, &ecp);
 
 		if (res)
-			ast_log(LOG_WARNING, "Unable to disable echo cancellation on channel %d\n", p->channel);
+			ast_log(LOG_WARNING, "Unable to disable echo cancellation on channel %d: %s\n", p->channel, strerror(errno));
 		else
 			ast_debug(1, "Disabled echo cancellation on channel %d\n", p->channel);
 	}
@@ -1846,7 +1846,7 @@
 		y = 1;
 		res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_AUDIOMODE, &y);
 		if (res)
-			ast_log(LOG_WARNING, "Unable to set audio mode on '%d'\n", p->channel);
+			ast_log(LOG_WARNING, "Unable to set audio mode on %d: %s\n", p->channel, strerror(errno));
 	}
 	res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_CONFMUTE, &x);
 	if (res < 0)
@@ -2095,7 +2095,7 @@
 	x = DAHDI_FLUSH_READ | DAHDI_FLUSH_WRITE;
 	res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_FLUSH, &x);
 	if (res)
-		ast_log(LOG_WARNING, "Unable to flush input on channel %d\n", p->channel);
+		ast_log(LOG_WARNING, "Unable to flush input on channel %d: %s\n", p->channel, strerror(errno));
 	p->outgoing = 1;
 
 	set_actual_gain(p->subs[SUB_REAL].zfd, 0, p->rxgain, p->txgain, p->law);
@@ -2129,11 +2129,11 @@
 			/* Choose proper cadence */
 			if ((p->distinctivering > 0) && (p->distinctivering <= num_cadence)) {
 				if (ioctl(p->subs[SUB_REAL].zfd, DAHDI_SETCADENCE, &cadences[p->distinctivering - 1]))
-					ast_log(LOG_WARNING, "Unable to set distinctive ring cadence %d on '%s'\n", p->distinctivering, ast->name);
+					ast_log(LOG_WARNING, "Unable to set distinctive ring cadence %d on '%s': %s\n", p->distinctivering, ast->name, strerror(errno));
 				p->cidrings = cidrings[p->distinctivering - 1];
 			} else {
 				if (ioctl(p->subs[SUB_REAL].zfd, DAHDI_SETCADENCE, NULL))
-					ast_log(LOG_WARNING, "Unable to reset default ring on '%s'\n", ast->name);
+					ast_log(LOG_WARNING, "Unable to reset default ring on '%s': %s\n", ast->name, strerror(errno));
 				p->cidrings = p->sendcalleridafter;
 			}
 
@@ -2309,9 +2309,11 @@
 			p->echobreak = 0;
 		if (!res) {
 			if (ioctl(p->subs[SUB_REAL].zfd, DAHDI_DIAL, &p->dop)) {
+				int saveerr = errno;
+
 				x = DAHDI_ONHOOK;
 				ioctl(p->subs[SUB_REAL].zfd, DAHDI_HOOK, &x);
-				ast_log(LOG_WARNING, "Dialing failed on channel %d: %s\n", p->channel, strerror(errno));
+				ast_log(LOG_WARNING, "Dialing failed on channel %d: %s\n", p->channel, strerror(saveerr));
 				ast_mutex_unlock(&p->lock);
 				return -1;
 			}
@@ -3121,7 +3123,7 @@
 		law = DAHDI_LAW_DEFAULT;
 		res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_SETLAW, &law);
 		if (res < 0) 
-			ast_log(LOG_WARNING, "Unable to set law on channel %d to default\n", p->channel);
+			ast_log(LOG_WARNING, "Unable to set law on channel %d to default: %s\n", p->channel, strerror(errno));
 		/* Perform low level hangup if no owner left */
 #ifdef HAVE_SS7
 		if (p->ss7) {
@@ -3543,7 +3545,7 @@
 			x = 1;
 		}
 		if (ioctl(p->subs[SUB_REAL].zfd, DAHDI_AUDIOMODE, &x) == -1)
-			ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d\n", p->channel, x);
+			ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d: %s\n", p->channel, x, strerror(errno));
 		break;
 	case AST_OPTION_OPRMODE:  /* Operator services mode */
 		oprmode = (struct oprmode *) data;
@@ -4146,7 +4148,7 @@
 		return 0;
 	memset(&ci, 0, sizeof(ci));
 	if (ioctl(p->subs[SUB_REAL].zfd, DAHDI_GETCONF, &ci)) {
-		ast_log(LOG_WARNING, "Failed to get conference info on channel %d\n", p->channel);
+		ast_log(LOG_WARNING, "Failed to get conference info on channel %d: %s\n", p->channel, strerror(errno));
 		return 0;
 	}
 	/* If we have no master and don't have a confno, then 
@@ -4172,9 +4174,13 @@
 
 	memset(&zi, 0, sizeof(zi));
 	zi.spanno = p->span;
+
 	if ((res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_SPANSTAT, &zi)) >= 0) {
 		if (zi.alarms != DAHDI_ALARM_NONE)
 			return zi.alarms;
+	} else {
+		ast_log(LOG_WARNING, "Unable to determine alarm on channel %d: %s\n", p->channel, strerror(errno));
+		return 0;
 	}
 
 	/* No alarms on the span. Check for channel alarms. */
@@ -4317,7 +4323,7 @@
 			if (p->inalarm) break;
 			if ((p->radio || (p->oprmode < 0))) break;
 			if (ioctl(p->subs[index].zfd,DAHDI_DIALING,&x) == -1) {
-				ast_debug(1, "DAHDI_DIALING ioctl failed on %s\n",ast->name);
+				ast_log(LOG_DEBUG, "DAHDI_DIALING ioctl failed on %s: %s\n",ast->name, strerror(errno));
 				return NULL;
 			}
 			if (!x) { /* if not still dialing in driver */
@@ -4565,9 +4571,11 @@
 				} else
 					p->echobreak = 0;
 				if (ioctl(p->subs[SUB_REAL].zfd, DAHDI_DIAL, &p->dop)) {
+					int saveerr = errno;
+
 					x = DAHDI_ONHOOK;
 					ioctl(p->subs[SUB_REAL].zfd, DAHDI_HOOK, &x);
-					ast_log(LOG_WARNING, "Dialing failed on channel %d: %s\n", p->channel, strerror(errno));
+					ast_log(LOG_WARNING, "Dialing failed on channel %d: %s\n", p->channel, strerror(saveerr));
 					return NULL;
 					}
 				p->dialing = 1;
@@ -4601,7 +4609,7 @@
 						/* nick at dccinc.com 4/3/03 - fxo should be able to do deferred dialing */
 						res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_DIAL, &p->dop);
 						if (res < 0) {
-							ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d\n", p->channel);
+							ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d: %s\n", p->channel, strerror(errno));
 							p->dop.dialstr[0] = '\0';
 							return NULL;
 						} else {
@@ -4954,7 +4962,7 @@
 				if (!ast_strlen_zero(p->dop.dialstr)) {
 					res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_DIAL, &p->dop);
 					if (res < 0) {
-						ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d\n", p->channel);
+						ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d: %s\n", p->channel, strerror(errno));
 						p->dop.dialstr[0] = '\0';
 						return NULL;
 					} else 
@@ -4983,7 +4991,7 @@
 				if (!ast_strlen_zero(p->dop.dialstr)) {
 					res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_DIAL, &p->dop);
 					if (res < 0) {
-						ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d\n", p->channel);
+						ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d: %s\n", p->channel, strerror(errno));
 						p->dop.dialstr[0] = '\0';
 						return NULL;
 					} else 
@@ -5840,7 +5848,7 @@
 	ps.channo = i->channel;
 	res = ioctl(i->subs[SUB_REAL].zfd, DAHDI_GET_PARAMS, &ps);
 	if (res) {
-		ast_log(LOG_WARNING, "Unable to get parameters, assuming MULAW\n");
+		ast_log(LOG_WARNING, "Unable to get parameters, assuming MULAW: %s\n", strerror(errno));
 		ps.curlaw = DAHDI_LAW_MULAW;
 	}
 	if (ps.curlaw == DAHDI_LAW_ALAW)
@@ -7509,7 +7517,7 @@
 				/* Send the Ring Pulse Signal Alert */
 				res = ioctl(mtd->pvt->subs[SUB_REAL].zfd, DAHDI_SETCADENCE, &AS_RP_cadence);
 				if (res) {
-					ast_log(LOG_WARNING, "Unable to set RP-AS ring cadence\n");
+					ast_log(LOG_WARNING, "Unable to set RP-AS ring cadence: %s\n", strerror(errno));
 					goto quit;
 				}
 				dahdi_set_hook(mtd->pvt->subs[SUB_REAL].zfd, DAHDI_RING);
@@ -7917,7 +7925,7 @@
 #ifdef DAHDI_VMWI
 								res2 = ioctl(last->subs[SUB_REAL].zfd, DAHDI_VMWI, res);
 								if (res2) {
-									ast_log(LOG_DEBUG, "Unable to control message waiting led on channel %d\n", last->channel);
+									ast_log(LOG_DEBUG, "Unable to control message waiting led on channel %d: %s\n", last->channel, strerror(errno));
 								}
 #endif
 								pthread_attr_init(&attr);
@@ -8123,7 +8131,7 @@
 			return -1;
 		}
 		if (ioctl(fd, DAHDI_SPANSTAT, &si)) {
-			ast_log(LOG_WARNING, "Failed go get span information on channel %d (span %d)\n", channels[y], p.spanno);
+			ast_log(LOG_WARNING, "Failed go get span information on channel %d (span %d): %s\n", channels[y], p.spanno, strerror(errno));
 			dahdi_close(fd);
 			return -1;
 		}
@@ -8274,7 +8282,7 @@
 				memset(&p, 0, sizeof(p));
 				res = ioctl(tmp->subs[SUB_REAL].zfd, DAHDI_GET_PARAMS, &p);
 				if (res < 0) {
-					ast_log(LOG_ERROR, "Unable to get parameters\n");
+					ast_log(LOG_ERROR, "Unable to get parameters: %s\n", strerror(errno));
 					destroy_dahdi_pvt(&tmp);
 					return NULL;
 				}
@@ -8524,7 +8532,7 @@
 		{
 			res = ioctl(tmp->subs[SUB_REAL].zfd, DAHDI_SET_PARAMS, &p);
 			if (res < 0) {
-				ast_log(LOG_ERROR, "Unable to set parameters\n");
+				ast_log(LOG_ERROR, "Unable to set parameters: %s\n", strerror(errno));
 				destroy_dahdi_pvt(&tmp);
 				return NULL;
 			}
@@ -8539,10 +8547,10 @@
 				bi.numbufs = numbufs;
 				res = ioctl(tmp->subs[SUB_REAL].zfd, DAHDI_SET_BUFINFO, &bi);
 				if (res < 0) {
-					ast_log(LOG_WARNING, "Unable to set buffer policy on channel %d\n", channel);
+					ast_log(LOG_WARNING, "Unable to set buffer policy on channel %d: %s\n", channel, strerror(errno));
 				}
 			} else
-				ast_log(LOG_WARNING, "Unable to check buffer policy on channel %d\n", channel);
+				ast_log(LOG_WARNING, "Unable to check buffer policy on channel %d: %s\n", channel, strerror(errno));
 		}
 #endif
 		tmp->immediate = conf->chan.immediate;
@@ -8821,7 +8829,7 @@
 				par.rxisoffhook = 0;
 			}
 			if (res) {
-				ast_log(LOG_WARNING, "Unable to check hook state on channel %d\n", p->channel);
+				ast_log(LOG_WARNING, "Unable to check hook state on channel %d: %s\n", p->channel, strerror(errno));
 			} else if ((p->sig == SIG_FXSKS) || (p->sig == SIG_FXSGS)) {
 				/* When "onhook" that means no battery on the line, and thus
 				  it is out of service..., if it's on a TDM card... If it's a channel
@@ -8895,10 +8903,10 @@
 			bi.numbufs = numbufs;
 			res = ioctl(p->subs[SUB_REAL].zfd, DAHDI_SET_BUFINFO, &bi);
 			if (res < 0) {
-				ast_log(LOG_WARNING, "Unable to set buffer policy on dup channel\n");
+				ast_log(LOG_WARNING, "Unable to set buffer policy on dup channel: %s\n", strerror(errno));
 			}
 		} else
-			ast_log(LOG_WARNING, "Unable to check buffer policy on dup channel\n");
+			ast_log(LOG_WARNING, "Unable to check buffer policy on dup channel: %s\n", strerror(errno));
 	}
 	p->destroy = 1;
 	p->next = iflist;
@@ -9269,7 +9277,7 @@
 {
 	if (p->loopedback != enable) {
 		if (ioctl(p->subs[SUB_REAL].zfd, DAHDI_LOOPBACK, &enable)) {
-			ast_log(LOG_WARNING, "Unable to set loopback on channel %d\n", p->channel);
+			ast_log(LOG_WARNING, "Unable to set loopback on channel %d: %s\n", p->channel, strerror(errno));
 			return;
 		}
 		p->loopedback = enable;
@@ -9286,7 +9294,7 @@
 	char tmp[256];
 
 	if (ioctl(p->subs[SUB_REAL].zfd, DAHDI_AUDIOMODE, &law) == -1)
-		ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d\n", p->channel, law);
+		ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d: %s\n", p->channel, law, strrerror(errno));
 	
 	if (linkset->type == SS7_ITU)
 		law = DAHDI_LAW_ALAW;
@@ -10788,7 +10796,7 @@
 							/* Set to audio mode at this point */
 							law = 1;
 							if (ioctl(pri->pvts[chanpos]->subs[SUB_REAL].zfd, DAHDI_AUDIOMODE, &law) == -1)
-								ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d\n", pri->pvts[chanpos]->channel, law);
+								ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d: %s\n", pri->pvts[chanpos]->channel, law, strerror(errno));
 						}
 						if (e->ring.layer1 == PRI_LAYER_1_ALAW)
 							law = DAHDI_LAW_ALAW;
@@ -11103,7 +11111,7 @@
 							/* Send any "w" waited stuff */
 							res = ioctl(pri->pvts[chanpos]->subs[SUB_REAL].zfd, DAHDI_DIAL, &pri->pvts[chanpos]->dop);
 							if (res < 0) {
-								ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d\n", pri->pvts[chanpos]->channel);
+								ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d: %s\n", pri->pvts[chanpos]->channel, strerror(errno));
 								pri->pvts[chanpos]->dop.dialstr[0] = '\0';
 							} else
 								ast_debug(1, "Sent deferred digit string: %s\n", pri->pvts[chanpos]->dop.dialstr);
@@ -11426,7 +11434,7 @@
 		if ((p.sigtype != DAHDI_SIG_HDLCFCS) && (p.sigtype != DAHDI_SIG_HARDHDLC)) {
 			dahdi_close(pri->fds[i]);
 			pri->fds[i] = -1;
-			ast_log(LOG_ERROR, "D-channel %d is not in HDLC/FCS mode.  See /etc/dahdi.conf\n", x);
+			ast_log(LOG_ERROR, "D-channel %d is not in HDLC/FCS mode.\n", x);
 			return -1;
 		}
 		memset(&si, 0, sizeof(si));
@@ -11445,7 +11453,7 @@
 		bi.numbufs = 32;
 		bi.bufsize = 1024;
 		if (ioctl(pri->fds[i], DAHDI_SET_BUFINFO, &bi)) {
-			ast_log(LOG_ERROR, "Unable to set appropriate buffering on channel %d\n", x);
+			ast_log(LOG_ERROR, "Unable to set appropriate buffering on channel %d: %s\n", x, strerror(errno));
 			dahdi_close(pri->fds[i]);
 			pri->fds[i] = -1;
 			return -1;
@@ -12276,7 +12284,7 @@
 				}
 #endif
 				if (ioctl(tmp->subs[SUB_REAL].zfd, DAHDI_GET_PARAMS, &ps) < 0) {
-					ast_log(LOG_WARNING, "Failed to get parameters on channel %d\n", tmp->channel);
+					ast_log(LOG_WARNING, "Failed to get parameters on channel %d: %s\n", tmp->channel, strerror(errno));
 				} else {
 					ast_cli(a->fd, "Hookstate (FXS only): %s\n", ps.rxisoffhook ? "Offhook" : "Onhook");
 				}
@@ -12500,7 +12508,7 @@
 	strcpy(vi.echo_canceller, "Unknown");
 
 	if (ioctl(pseudo_fd, DAHDI_GETVERSION, &vi))
-		ast_cli(a->fd, "Failed to get version from control file.\n");
+		ast_cli(a->fd, "Failed to get DAHDI version: %s\n", strerror(errno));
 	else
 		ast_cli(a->fd, "DAHDI Version: %s Echo Canceller: %s\n", vi.version, vi.echo_canceller);
 
@@ -12577,7 +12585,7 @@
 		hwgain.newgain = gain;
 		hwgain.tx = tx;
 		if (ioctl(tmp->subs[SUB_REAL].zfd, DAHDI_SET_HWGAIN, &hwgain) < 0) {
-			ast_cli(a->fd, "Unable to set the hardware gain for channel %d\n", channel);
+			ast_cli(a->fd, "Unable to set the hardware gain for channel %d: %s\n", channel, strerror(errno));
 			ast_mutex_unlock(&iflock);
 			return CLI_FAILURE;
 		}
@@ -13191,7 +13199,7 @@
 		if ((p.sigtype != DAHDI_SIG_HDLCFCS) && (p.sigtype != DAHDI_SIG_HARDHDLC) && (p.sigtype != DAHDI_SIG_MTP2)) {
 			dahdi_close(link->fds[curfd]);
 			link->fds[curfd] = -1;
-			ast_log(LOG_ERROR, "sigchan %d is not in HDLC/FCS mode.  See /etc/dahdi.conf\n", sigchan);
+			ast_log(LOG_ERROR, "sigchan %d is not in HDLC/FCS mode.\n", sigchan);
 			return -1;
 		}
 
@@ -13201,7 +13209,7 @@
 		bi.bufsize = 512;
 
 		if (ioctl(link->fds[curfd], DAHDI_SET_BUFINFO, &bi)) {
-			ast_log(LOG_ERROR, "Unable to set appropriate buffering on channel %d\n", sigchan);
+			ast_log(LOG_ERROR, "Unable to set appropriate buffering on channel %d: %s\n", sigchan, strerror(errno));
 			dahdi_close(link->fds[curfd]);
 			link->fds[curfd] = -1;
 			return -1;
@@ -14399,7 +14407,7 @@
 					dps.dtmf_tonelen = dps.mfv1_tonelen = toneduration;
 					res = ioctl(ctlfd, DAHDI_SET_DIALPARAMS, &dps);
 					if (res < 0) {
-						ast_log(LOG_ERROR, "Invalid tone duration: %d ms at line %d.\n", toneduration, v->lineno);
+						ast_log(LOG_ERROR, "Invalid tone duration: %d ms at line %d: %s\n", toneduration, v->lineno, strerror(errno));
 						return -1;
 					}
 				}

Modified: team/seanbright/resolve-shadow-warnings/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/channels/chan_sip.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/channels/chan_sip.c (original)
+++ team/seanbright/resolve-shadow-warnings/channels/chan_sip.c Thu Jun 26 13:22:13 2008
@@ -4284,6 +4284,7 @@
 	dialog->allowtransfer = peer->allowtransfer;
 	dialog->jointnoncodeccapability = dialog->noncodeccapability;
 	dialog->rtptimeout = peer->rtptimeout;
+	dialog->peerauth = peer->auth;
 	dialog->maxcallbitrate = peer->maxcallbitrate;
 	if (ast_strlen_zero(dialog->tohost))
 		ast_string_field_set(dialog, tohost, ast_inet_ntoa(dialog->sa.sin_addr));
@@ -4306,7 +4307,6 @@
 		ast_string_field_set(dialog, fromuser, peer->fromuser);
 	if (!ast_strlen_zero(peer->language))
 		ast_string_field_set(dialog, language, peer->language);
-
 	/* Set timer T1 to RTT for this peer (if known by qualify=) */
 	/* Minimum is settable or default to 100 ms */
 	/* If there is a maxms and lastms from a qualify use that over a manual T1
@@ -15317,9 +15317,11 @@
 	snprintf(cnonce, sizeof(cnonce), "%08lx", ast_random());
 
  	/* Check if we have separate auth credentials */
- 	if ((auth = find_realm_authentication(authl, p->realm))) {
-		ast_log(LOG_WARNING, "use realm [%s] from peer [%s][%s]\n",
-			auth->username, p->peername, p->username);
+ 	if(!(auth = find_realm_authentication(p->peerauth, p->realm)))	/* Start with peer list */
+ 		auth = find_realm_authentication(authl, p->realm);	/* If not, global list */
+
+ 	if (auth) {
+		ast_log(LOG_DEBUG, "use realm [%s] from peer [%s][%s]\n", auth->username, p->peername, p->username);
  		username = auth->username;
  		secret = auth->secret;
  		md5secret = auth->md5secret;

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_a_mu.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_a_mu.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_a_mu.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_a_mu.c Thu Jun 26 13:22:13 2008
@@ -47,7 +47,7 @@
 {
 	int x = f->samples;
 	unsigned char *src = f->data.ptr;
-	unsigned char *dst = (unsigned char *)pvt->outbuf + pvt->samples;
+	unsigned char *dst = pvt->outbuf.uc + pvt->samples;
 
 	pvt->samples += x;
 	pvt->datalen += x;
@@ -63,7 +63,7 @@
 {
 	int x = f->samples;
 	unsigned char *src = f->data.ptr;
-	unsigned char *dst = (unsigned char *)pvt->outbuf + pvt->samples;
+	unsigned char *dst = pvt->outbuf.uc + pvt->samples;
 
 	pvt->samples += x;
 	pvt->datalen += x;

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_adpcm.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_adpcm.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_adpcm.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_adpcm.c Thu Jun 26 13:22:13 2008
@@ -230,7 +230,7 @@
 	struct adpcm_decoder_pvt *tmp = pvt->pvt;
 	int x = f->datalen;
 	unsigned char *src = f->data.ptr;
-	int16_t *dst = (int16_t *)pvt->outbuf + pvt->samples;
+	int16_t *dst = pvt->outbuf.i16 + pvt->samples;
 
 	while (x--) {
 		*dst++ = decode((*src >> 4) & 0xf, &tmp->state);
@@ -265,7 +265,7 @@
 	pvt->samples &= ~1; /* atomic size is 2 samples */
 
 	for (i = 0; i < pvt->samples; i += 2) {
-		pvt->outbuf[i/2] =
+		pvt->outbuf.c[i/2] =
 			(adpcm(tmp->inbuf[i  ], &tmp->state) << 4) |
 			(adpcm(tmp->inbuf[i+1], &tmp->state)     );
 	};

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_alaw.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_alaw.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_alaw.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_alaw.c Thu Jun 26 13:22:13 2008
@@ -45,7 +45,7 @@
 {
 	int i = f->samples;
 	unsigned char *src = f->data.ptr;
-	int16_t *dst = (int16_t *)pvt->outbuf + pvt->samples;
+	int16_t *dst = pvt->outbuf.i16 + pvt->samples;
 
 	pvt->samples += i;
 	pvt->datalen += i * 2;	/* 2 bytes/sample */
@@ -60,7 +60,7 @@
 static int lintoalaw_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	int i = f->samples;
-	char *dst = pvt->outbuf + pvt->samples;
+	char *dst = pvt->outbuf.c + pvt->samples;
 	int16_t *src = f->data.ptr;
 
 	pvt->samples += i;

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_g722.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_g722.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_g722.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_g722.c Thu Jun 26 13:22:13 2008
@@ -107,7 +107,7 @@
 	/* g722_decode expects the samples to be in the invalid samples / 2 format */
 	in_samples = f->samples / 2;
 
-	out_samples = g722_decode(&tmp->g722, (int16_t *) &pvt->outbuf[pvt->samples * sizeof(int16_t)], 
+	out_samples = g722_decode(&tmp->g722, &pvt->outbuf.i16[pvt->samples * sizeof(int16_t)], 
 		(uint8_t *) f->data.ptr, in_samples);
 
 	pvt->samples += out_samples;
@@ -122,7 +122,7 @@
 	struct g722_encoder_pvt *tmp = pvt->pvt;
 	int outlen;
 
-	outlen = g722_encode(&tmp->g722, (uint8_t *) (&pvt->outbuf[pvt->datalen]), 
+	outlen = g722_encode(&tmp->g722, (&pvt->outbuf.ui8[pvt->datalen]), 
 		(int16_t *) f->data.ptr, f->samples);
 
 	pvt->samples += outlen * 2;

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_g726.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_g726.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_g726.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_g726.c Thu Jun 26 13:22:13 2008
@@ -693,7 +693,7 @@
 {
 	struct g726_coder_pvt *tmp = pvt->pvt;
 	unsigned char *src = f->data.ptr;
-	int16_t *dst = (int16_t *) pvt->outbuf + pvt->samples;
+	int16_t *dst = pvt->outbuf.i16 + pvt->samples;
 	unsigned int i;
 
 	for (i = 0; i < f->datalen; i++) {
@@ -718,7 +718,7 @@
 		unsigned char d = g726_encode(src[i], &tmp->g726); /* this sample */
 
 		if (tmp->next_flag & 0x80) {	/* merge with leftover sample */
-			pvt->outbuf[pvt->datalen++] = ((tmp->next_flag & 0xf)<< 4) | d;
+			pvt->outbuf.c[pvt->datalen++] = ((tmp->next_flag & 0xf)<< 4) | d;
 			pvt->samples += 2;	/* 2 samples per byte */
 			tmp->next_flag = 0;
 		} else {
@@ -734,7 +734,7 @@
 {
 	struct g726_coder_pvt *tmp = pvt->pvt;
 	unsigned char *src = f->data.ptr;
-	int16_t *dst = (int16_t *) pvt->outbuf + pvt->samples;
+	int16_t *dst = pvt->outbuf.i16 + pvt->samples;
 	unsigned int i;
 
 	for (i = 0; i < f->datalen; i++) {
@@ -759,7 +759,7 @@
 		unsigned char d = g726_encode(src[i], &tmp->g726); /* this sample */
 
 		if (tmp->next_flag & 0x80) {	/* merge with leftover sample */
-			pvt->outbuf[pvt->datalen++] = (d << 4) | (tmp->next_flag & 0xf);
+			pvt->outbuf.c[pvt->datalen++] = (d << 4) | (tmp->next_flag & 0xf);
 			pvt->samples += 2;	/* 2 samples per byte */
 			tmp->next_flag = 0;
 		} else {
@@ -774,7 +774,7 @@
 static int g726tog726aal2_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	unsigned char *src = f->data.ptr;
-	unsigned char *dst = (unsigned char *) pvt->outbuf + pvt->samples;
+	unsigned char *dst = pvt->outbuf.uc + pvt->samples;
 	unsigned int i;
 
 	for (i = 0; i < f->datalen; i++)

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_ilbc.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_ilbc.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_ilbc.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_ilbc.c Thu Jun 26 13:22:13 2008
@@ -114,7 +114,7 @@
 	/* Assuming there's space left, decode into the current buffer at
 	   the tail location.  Read in as many frames as there are */
 	int x,i;
-	int16_t *dst = (int16_t *)pvt->outbuf;
+	int16_t *dst = pvt->outbuf.i16;
 	float tmpf[ILBC_SAMPLES];
 
 	if (f->datalen == 0) { /* native PLC, set fake f->datalen and clear plc_mode */
@@ -174,7 +174,7 @@
 		/* Encode a frame of data */
 		for (i = 0 ; i < ILBC_SAMPLES ; i++)
 			tmpf[i] = tmp->buf[samples + i];
-		iLBC_encode((unsigned char *) pvt->outbuf + datalen, tmpf, &tmp->enc);
+		iLBC_encode( pvt->outbuf.uc + datalen, tmpf, &tmp->enc);
 
 		datalen += ILBC_FRAME_LEN;
 		samples += ILBC_SAMPLES;

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_lpc10.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_lpc10.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_lpc10.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_lpc10.c Thu Jun 26 13:22:13 2008
@@ -140,7 +140,7 @@
 static int lpc10tolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	struct lpc10_coder_pvt *tmp = pvt->pvt;
-	int16_t *dst = (int16_t *)pvt->outbuf;
+	int16_t *dst = pvt->outbuf.i16;
 	int len = 0;
 
 	while (len + LPC10_BYTES_IN_COMPRESSED_FRAME <= f->datalen) {
@@ -200,7 +200,7 @@
 		for (x=0;x<LPC10_SAMPLES_PER_FRAME;x++)
 			tmpbuf[x] = (float)tmp->buf[x + samples] / 32768.0;
 		lpc10_encode(tmpbuf, bits, tmp->lpc10.enc);
-		build_bits((unsigned char *) pvt->outbuf + datalen, bits);
+		build_bits(pvt->outbuf.uc + datalen, bits);
 		datalen += LPC10_BYTES_IN_COMPRESSED_FRAME;
 		samples += LPC10_SAMPLES_PER_FRAME;
 		pvt->samples -= LPC10_SAMPLES_PER_FRAME;

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_resample.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_resample.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_resample.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_resample.c Thu Jun 26 13:22:13 2008
@@ -103,7 +103,7 @@
 	int total_in_buf_used = 0;
 	int total_out_buf_used = 0;
 	int16_t *in_buf = (int16_t *) f->data.ptr;
-	int16_t *out_buf = (int16_t *) pvt->outbuf + pvt->samples;
+	int16_t *out_buf = pvt->outbuf.i16 + pvt->samples;
 	float in_buf_f[f->samples];
 	float out_buf_f[2048];
 	int res = 0;

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_speex.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_speex.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_speex.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_speex.c Thu Jun 26 13:22:13 2008
@@ -193,7 +193,7 @@
 	   the tail location.  Read in as many frames as there are */
 	int x;
 	int res;
-	int16_t *dst = (int16_t *)pvt->outbuf;
+	int16_t *dst = pvt->outbuf.i16;
 	/* XXX fout is a temporary buffer, may have different types */
 #ifdef _SPEEX_TYPES_H
 	spx_int16_t fout[1024];
@@ -316,7 +316,7 @@
 
 	/* Terminate bit stream */
 	speex_bits_pack(&tmp->bits, 15, 5);
-	datalen = speex_bits_write(&tmp->bits, pvt->outbuf, pvt->t->buf_size);
+	datalen = speex_bits_write(&tmp->bits, pvt->outbuf.c, pvt->t->buf_size);
 	return ast_trans_frameout(pvt, datalen, samples);
 }
 

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_ulaw.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_ulaw.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_ulaw.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_ulaw.c Thu Jun 26 13:22:13 2008
@@ -45,7 +45,7 @@
 {
 	int i = f->samples;
 	unsigned char *src = f->data.ptr;
-	int16_t *dst = (int16_t *)pvt->outbuf + pvt->samples;
+	int16_t *dst = pvt->outbuf.i16 + pvt->samples;
 
 	pvt->samples += i;
 	pvt->datalen += i * 2;	/* 2 bytes/sample */
@@ -61,7 +61,7 @@
 static int lintoulaw_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
 	int i = f->samples;
-	char *dst = pvt->outbuf + pvt->samples;
+	char *dst = pvt->outbuf.c + pvt->samples;
 	int16_t *src = f->data.ptr;
 
 	pvt->samples += i;

Modified: team/seanbright/resolve-shadow-warnings/include/asterisk/timing.h
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/include/asterisk/timing.h?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/include/asterisk/timing.h (original)
+++ team/seanbright/resolve-shadow-warnings/include/asterisk/timing.h Thu Jun 26 13:22:13 2008
@@ -72,6 +72,7 @@
 	int (*timer_enable_continuous)(int handle);
 	int (*timer_disable_continuous)(int handle);
 	enum ast_timing_event (*timer_get_event)(int handle);
+	unsigned int (*timer_get_max_rate)(int handle);
 };
 
 /*!
@@ -175,6 +176,15 @@
  */
 enum ast_timing_event ast_timer_get_event(int handle);
 
+/*!
+ * \brief Get maximum rate supported for a timing handle
+ *
+ * \arg handle timing fd returned by timer_open()
+ *
+ * \return maximum rate supported for timing handle
+ */
+unsigned int ast_timer_get_max_rate(int handle);
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif

Modified: team/seanbright/resolve-shadow-warnings/include/asterisk/translate.h
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/include/asterisk/translate.h?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/include/asterisk/translate.h (original)
+++ team/seanbright/resolve-shadow-warnings/include/asterisk/translate.h Thu Jun 26 13:22:13 2008
@@ -136,14 +136,19 @@
  */
 struct ast_trans_pvt {
 	struct ast_translator *t;
-	struct ast_frame f;	/*!< used in frameout */
-	int samples;		/*!< samples available in outbuf */
+	struct ast_frame f;         /*!< used in frameout */
+	int samples;                /*!< samples available in outbuf */
 	/*! \brief actual space used in outbuf */
 	int datalen;
-	void *pvt;		/*!< more private data, if any */
-	char *outbuf;		/*!< the useful portion of the buffer */
-	plc_state_t *plc;	/*!< optional plc pointer */
-	struct ast_trans_pvt *next;	/*!< next in translator chain */
+	void *pvt;                  /*!< more private data, if any */
+	union {
+		char *c;                /*!< the useful portion of the buffer */
+		unsigned char *uc;      /*!< the useful portion of the buffer */
+		int16_t *i16;
+		uint8_t *ui8;
+	} outbuf; 
+	plc_state_t *plc;           /*!< optional plc pointer */
+	struct ast_trans_pvt *next; /*!< next in translator chain */
 	struct timeval nextin;
 	struct timeval nextout;
 	unsigned int destroy:1;

Modified: team/seanbright/resolve-shadow-warnings/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/main/channel.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/main/channel.c (original)
+++ team/seanbright/resolve-shadow-warnings/main/channel.c Thu Jun 26 13:22:13 2008
@@ -2174,6 +2174,7 @@
 int ast_settimeout(struct ast_channel *c, unsigned int rate, int (*func)(const void *data), void *data)
 {
 	int res;
+	unsigned int real_rate = rate, max_rate;
 
 	if (c->timingfd == -1) {
 		return -1;
@@ -2184,9 +2185,13 @@
 		data = NULL;
 	}
 
-	ast_debug(1, "Scheduling timer at %u timer ticks per second\n", rate);
-
-	res = ast_timer_set_rate(c->timingfd, rate);
+	if (rate && rate > (max_rate = ast_timer_get_max_rate(c->timingfd))) {
+		real_rate = max_rate;
+	}
+
+	ast_debug(1, "Scheduling timer at (%u requested / %u actual) timer ticks per second\n", rate, real_rate);
+
+	res = ast_timer_set_rate(c->timingfd, real_rate);
 
 	c->timingfunc = func;
 	c->timingdata = data;

Modified: team/seanbright/resolve-shadow-warnings/main/timing.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/main/timing.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/main/timing.c (original)
+++ team/seanbright/resolve-shadow-warnings/main/timing.c Thu Jun 26 13:22:13 2008
@@ -46,6 +46,7 @@
 		!funcs->timer_set_rate ||
 	    !funcs->timer_ack ||
 	    !funcs->timer_get_event ||
+		!funcs->timer_get_max_rate ||
 	    !funcs->timer_enable_continuous ||
 	    !funcs->timer_disable_continuous) {
 		return NULL;
@@ -196,6 +197,19 @@
 	ast_rwlock_unlock(&lock);
 
 	return result;
+}
+
+unsigned int ast_timer_get_max_rate(int handle)
+{
+	unsigned int res;
+
+	ast_rwlock_rdlock(&lock);
+
+	res = timer_funcs.timer_get_max_rate(handle);
+
+	ast_rwlock_unlock(&lock);
+
+	return res;
 }
 
 static char *timing_test(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)

Modified: team/seanbright/resolve-shadow-warnings/main/translate.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/main/translate.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================
--- team/seanbright/resolve-shadow-warnings/main/translate.c (original)
+++ team/seanbright/resolve-shadow-warnings/main/translate.c Thu Jun 26 13:22:13 2008
@@ -119,7 +119,7 @@
 		ofs += sizeof(plc_state_t);
 	}
 	if (t->buf_size)		/* finally buffer and header */
-		pvt->outbuf = ofs + AST_FRIENDLY_OFFSET;
+		pvt->outbuf.c = ofs + AST_FRIENDLY_OFFSET;
 	/* call local init routine, if present */
 	if (t->newpvt && t->newpvt(pvt)) {
 		ast_free(pvt);
@@ -153,7 +153,7 @@
 /*! \brief framein wrapper, deals with plc and bound checks.  */
 static int framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
-	int16_t *dst = (int16_t *)pvt->outbuf;
+	int16_t *dst = pvt->outbuf.i16;
 	int ret;
 	int samples = pvt->samples;	/* initial value */
 	
@@ -235,7 +235,7 @@
 	f->mallocd = 0;
 	f->offset = AST_FRIENDLY_OFFSET;
 	f->src = pvt->t->name;
-	f->data.ptr = pvt->outbuf;
+	f->data.ptr = pvt->outbuf.c;
 
 	ast_set_flag(f, AST_FRFLAG_FROM_TRANSLATOR);
 

Modified: team/seanbright/resolve-shadow-warnings/res/res_timing_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/res/res_timing_dahdi.c?view=diff&rev=125455&r1=125454&r2=125455
==============================================================================

[... 65 lines stripped ...]



More information about the svn-commits mailing list