[asterisk-commits] trunk r15619 - /trunk/channels/chan_iax2.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Mar 28 11:00:10 MST 2006
Author: russell
Date: Tue Mar 28 12:00:05 2006
New Revision: 15619
URL: http://svn.digium.com/view/asterisk?rev=15619&view=rev
Log:
store f->callno in a local var (issue #6818)
Modified:
trunk/channels/chan_iax2.c
Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?rev=15619&r1=15618&r2=15619&view=diff
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Tue Mar 28 12:00:05 2006
@@ -1607,28 +1607,30 @@
{
int res;
char iabuf[INET_ADDRSTRLEN];
+ int callno = f->callno;
+
/* Called with iaxsl held */
if (option_debug > 2 && iaxdebug)
- ast_log(LOG_DEBUG, "Sending %d on %d/%d to %s:%d\n", f->ts, f->callno, iaxs[f->callno]->peercallno, ast_inet_ntoa(iabuf, sizeof(iabuf), iaxs[f->callno]->addr.sin_addr), ntohs(iaxs[f->callno]->addr.sin_port));
+ ast_log(LOG_DEBUG, "Sending %d on %d/%d to %s:%d\n", f->ts, callno, iaxs[callno]->peercallno, ast_inet_ntoa(iabuf, sizeof(iabuf), iaxs[callno]->addr.sin_addr), ntohs(iaxs[callno]->addr.sin_port));
/* Don't send if there was an error, but return error instead */
- if (!f->callno) {
- ast_log(LOG_WARNING, "Call number = %d\n", f->callno);
+ if (!callno) {
+ ast_log(LOG_WARNING, "Call number = %d\n", callno);
return -1;
}
- if (!iaxs[f->callno])
+ if (!iaxs[callno])
return -1;
- if (iaxs[f->callno]->error)
+ if (iaxs[callno]->error)
return -1;
if (f->transfer) {
if (iaxdebug)
- iax_showframe(f, NULL, 0, &iaxs[f->callno]->transfer, f->datalen - sizeof(struct ast_iax2_full_hdr));
- res = sendto(iaxs[f->callno]->sockfd, f->data, f->datalen, 0,(struct sockaddr *)&iaxs[f->callno]->transfer,
- sizeof(iaxs[f->callno]->transfer));
+ iax_showframe(f, NULL, 0, &iaxs[callno]->transfer, f->datalen - sizeof(struct ast_iax2_full_hdr));
+ res = sendto(iaxs[callno]->sockfd, f->data, f->datalen, 0,(struct sockaddr *)&iaxs[callno]->transfer,
+ sizeof(iaxs[callno]->transfer));
} else {
if (iaxdebug)
- iax_showframe(f, NULL, 0, &iaxs[f->callno]->addr, f->datalen - sizeof(struct ast_iax2_full_hdr));
- res = sendto(iaxs[f->callno]->sockfd, f->data, f->datalen, 0,(struct sockaddr *)&iaxs[f->callno]->addr,
- sizeof(iaxs[f->callno]->addr));
+ iax_showframe(f, NULL, 0, &iaxs[callno]->addr, f->datalen - sizeof(struct ast_iax2_full_hdr));
+ res = sendto(iaxs[callno]->sockfd, f->data, f->datalen, 0,(struct sockaddr *)&iaxs[callno]->addr,
+ sizeof(iaxs[callno]->addr));
}
if (res < 0) {
if (option_debug && iaxdebug)
More information about the asterisk-commits
mailing list