[svn-commits] branch murf/AEL-trunk-fixesonly r33396 - in
/team/murf/AEL-trunk-fixesonly: ....
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Fri Jun 9 15:35:52 MST 2006
Author: murf
Date: Fri Jun 9 17:35:51 2006
New Revision: 33396
URL: http://svn.digium.com/view/asterisk?rev=33396&view=rev
Log:
Merged revisions 33348-33351,33371,33374-33376 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r33348 | oej | 2006-06-09 14:09:55 -0600 (Fri, 09 Jun 2006) | 2 lines
Another try at hanging up the transferer channel after the masq
........
r33349 | oej | 2006-06-09 14:13:47 -0600 (Fri, 09 Jun 2006) | 2 lines
Move payloadtype back home to rtp.c
........
r33350 | kpfleming | 2006-06-09 14:26:25 -0600 (Fri, 09 Jun 2006) | 2 lines
various minor portability fixes (mostly from tholo for OpenBSD)
........
r33351 | kpfleming | 2006-06-09 14:40:10 -0600 (Fri, 09 Jun 2006) | 2 lines
there is no reason to define our own 'maximum path length' when the POSIX headers already define one for us
........
r33371 | oej | 2006-06-09 15:09:42 -0600 (Fri, 09 Jun 2006) | 3 lines
- RTP debug message formatting
- Add rtcp report to SIP history
........
r33374 | oej | 2006-06-09 15:28:52 -0600 (Fri, 09 Jun 2006) | 2 lines
Store RTCP reports in channel variables and SIP history
........
r33375 | oej | 2006-06-09 15:30:31 -0600 (Fri, 09 Jun 2006) | 3 lines
Add RTP QoS report variables to doc. Catch it in the "h" extension, store it in the CDR
or in a database or... whatever you want to.
........
r33376 | oej | 2006-06-09 15:32:48 -0600 (Fri, 09 Jun 2006) | 2 lines
Issue #7325 - Parse string after URI decoding (casper)
........
Modified:
team/murf/AEL-trunk-fixesonly/ (props changed)
team/murf/AEL-trunk-fixesonly/abstract_jb.c
team/murf/AEL-trunk-fixesonly/apps/app_followme.c
team/murf/AEL-trunk-fixesonly/apps/app_voicemail.c
team/murf/AEL-trunk-fixesonly/asterisk.c
team/murf/AEL-trunk-fixesonly/cdr/cdr_csv.c
team/murf/AEL-trunk-fixesonly/cdr/cdr_custom.c
team/murf/AEL-trunk-fixesonly/cdr/cdr_radius.c
team/murf/AEL-trunk-fixesonly/channels/chan_sip.c
team/murf/AEL-trunk-fixesonly/codecs/gsm/src/preprocess.c
team/murf/AEL-trunk-fixesonly/doc/channelvariables.txt
team/murf/AEL-trunk-fixesonly/include/asterisk.h
team/murf/AEL-trunk-fixesonly/include/asterisk/endian.h
team/murf/AEL-trunk-fixesonly/include/asterisk/rtp.h
team/murf/AEL-trunk-fixesonly/include/asterisk/stringfields.h
team/murf/AEL-trunk-fixesonly/logger.c
team/murf/AEL-trunk-fixesonly/pbx/Makefile
team/murf/AEL-trunk-fixesonly/pbx/ael/ael.flex
team/murf/AEL-trunk-fixesonly/pbx/ael/ael_lex.c
team/murf/AEL-trunk-fixesonly/plc.c
team/murf/AEL-trunk-fixesonly/res/res_musiconhold.c
team/murf/AEL-trunk-fixesonly/rtp.c
Propchange: team/murf/AEL-trunk-fixesonly/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jun 9 17:35:51 2006
@@ -1,1 +1,1 @@
-/trunk:1-33333
+/trunk:1-33395
Modified: team/murf/AEL-trunk-fixesonly/abstract_jb.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/abstract_jb.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/abstract_jb.c (original)
+++ team/murf/AEL-trunk-fixesonly/abstract_jb.c Fri Jun 9 17:35:51 2006
@@ -32,7 +32,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <limits.h>
#include "asterisk/frame.h"
#include "asterisk/channel.h"
Modified: team/murf/AEL-trunk-fixesonly/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/apps/app_followme.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/apps/app_followme.c (original)
+++ team/murf/AEL-trunk-fixesonly/apps/app_followme.c Fri Jun 9 17:35:51 2006
@@ -92,12 +92,12 @@
unsigned int active; /*!< Profile is active (1), or disabled (0). */
char takecall[20]; /*!< Digit mapping to take a call */
char nextindp[20]; /*!< Digit mapping to decline a call */
- char callfromprompt[AST_CONFIG_MAX_PATH];
- char norecordingprompt[AST_CONFIG_MAX_PATH];
- char optionsprompt[AST_CONFIG_MAX_PATH];
- char plsholdprompt[AST_CONFIG_MAX_PATH];
- char statusprompt[AST_CONFIG_MAX_PATH];
- char sorryprompt[AST_CONFIG_MAX_PATH];
+ char callfromprompt[PATH_MAX];
+ char norecordingprompt[PATH_MAX];
+ char optionsprompt[PATH_MAX];
+ char plsholdprompt[PATH_MAX];
+ char statusprompt[PATH_MAX];
+ char sorryprompt[PATH_MAX];
AST_LIST_HEAD_NOLOCK(numbers, number) numbers; /*!< Head of the list of follow-me numbers */
AST_LIST_HEAD_NOLOCK(blnumbers, number) blnumbers; /*!< Head of the list of black-listed numbers */
@@ -115,12 +115,12 @@
struct ast_channel *outbound;
char takecall[20]; /*!< Digit mapping to take a call */
char nextindp[20]; /*!< Digit mapping to decline a call */
- char callfromprompt[AST_CONFIG_MAX_PATH];
- char norecordingprompt[AST_CONFIG_MAX_PATH];
- char optionsprompt[AST_CONFIG_MAX_PATH];
- char plsholdprompt[AST_CONFIG_MAX_PATH];
- char statusprompt[AST_CONFIG_MAX_PATH];
- char sorryprompt[AST_CONFIG_MAX_PATH];
+ char callfromprompt[PATH_MAX];
+ char norecordingprompt[PATH_MAX];
+ char optionsprompt[PATH_MAX];
+ char plsholdprompt[PATH_MAX];
+ char statusprompt[PATH_MAX];
+ char sorryprompt[PATH_MAX];
struct ast_flags followmeflags;
};
@@ -156,12 +156,12 @@
static const char *defaultmoh = "default"; /*!< Default Music-On-Hold Class */
static char takecall[20] = "1", nextindp[20] = "2";
-static char callfromprompt[AST_CONFIG_MAX_PATH] = "followme/call-from";
-static char norecordingprompt[AST_CONFIG_MAX_PATH] = "followme/no-recording";
-static char optionsprompt[AST_CONFIG_MAX_PATH] = "followme/followme-options";
-static char plsholdprompt[AST_CONFIG_MAX_PATH] = "followme/pls-hold-while-try";
-static char statusprompt[AST_CONFIG_MAX_PATH] = "followme/followme-status";
-static char sorryprompt[AST_CONFIG_MAX_PATH] = "followme/followme-sorry";
+static char callfromprompt[PATH_MAX] = "followme/call-from";
+static char norecordingprompt[PATH_MAX] = "followme/no-recording";
+static char optionsprompt[PATH_MAX] = "followme/followme-options";
+static char plsholdprompt[PATH_MAX] = "followme/pls-hold-while-try";
+static char statusprompt[PATH_MAX] = "followme/followme-status";
+static char sorryprompt[PATH_MAX] = "followme/followme-sorry";
static AST_LIST_HEAD_STATIC(followmes, ast_call_followme);
Modified: team/murf/AEL-trunk-fixesonly/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/apps/app_voicemail.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/apps/app_voicemail.c (original)
+++ team/murf/AEL-trunk-fixesonly/apps/app_voicemail.c Fri Jun 9 17:35:51 2006
@@ -309,7 +309,7 @@
#define DELETE(a,b,c) (vm_delete(c))
#endif
-static char VM_SPOOL_DIR[AST_CONFIG_MAX_PATH];
+static char VM_SPOOL_DIR[PATH_MAX];
static char ext_pass_cmd[128];
@@ -651,8 +651,8 @@
char inbuf[256];
char orig[256];
char currcontext[256] ="";
- char tmpin[AST_CONFIG_MAX_PATH];
- char tmpout[AST_CONFIG_MAX_PATH];
+ char tmpin[PATH_MAX];
+ char tmpout[PATH_MAX];
struct stat statbuf;
if (!change_password_realtime(vmu, newpassword))
Modified: team/murf/AEL-trunk-fixesonly/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/asterisk.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/asterisk.c (original)
+++ team/murf/AEL-trunk-fixesonly/asterisk.c Fri Jun 9 17:35:51 2006
@@ -199,26 +199,26 @@
static int ast_el_read_history(char *);
static int ast_el_write_history(char *);
-char ast_config_AST_CONFIG_DIR[AST_CONFIG_MAX_PATH];
-char ast_config_AST_CONFIG_FILE[AST_CONFIG_MAX_PATH];
-char ast_config_AST_MODULE_DIR[AST_CONFIG_MAX_PATH];
-char ast_config_AST_SPOOL_DIR[AST_CONFIG_MAX_PATH];
-char ast_config_AST_MONITOR_DIR[AST_CONFIG_MAX_PATH];
-char ast_config_AST_VAR_DIR[AST_CONFIG_MAX_PATH];
-char ast_config_AST_DATA_DIR[AST_CONFIG_MAX_PATH];
-char ast_config_AST_LOG_DIR[AST_CONFIG_MAX_PATH];
-char ast_config_AST_AGI_DIR[AST_CONFIG_MAX_PATH];
-char ast_config_AST_DB[AST_CONFIG_MAX_PATH];
-char ast_config_AST_KEY_DIR[AST_CONFIG_MAX_PATH];
-char ast_config_AST_PID[AST_CONFIG_MAX_PATH];
-char ast_config_AST_SOCKET[AST_CONFIG_MAX_PATH];
-char ast_config_AST_RUN_DIR[AST_CONFIG_MAX_PATH];
-char ast_config_AST_RUN_USER[AST_CONFIG_MAX_PATH];
-char ast_config_AST_RUN_GROUP[AST_CONFIG_MAX_PATH];
-char ast_config_AST_CTL_PERMISSIONS[AST_CONFIG_MAX_PATH];
-char ast_config_AST_CTL_OWNER[AST_CONFIG_MAX_PATH] = "\0";
-char ast_config_AST_CTL_GROUP[AST_CONFIG_MAX_PATH] = "\0";
-char ast_config_AST_CTL[AST_CONFIG_MAX_PATH] = "asterisk.ctl";
+char ast_config_AST_CONFIG_DIR[PATH_MAX];
+char ast_config_AST_CONFIG_FILE[PATH_MAX];
+char ast_config_AST_MODULE_DIR[PATH_MAX];
+char ast_config_AST_SPOOL_DIR[PATH_MAX];
+char ast_config_AST_MONITOR_DIR[PATH_MAX];
+char ast_config_AST_VAR_DIR[PATH_MAX];
+char ast_config_AST_DATA_DIR[PATH_MAX];
+char ast_config_AST_LOG_DIR[PATH_MAX];
+char ast_config_AST_AGI_DIR[PATH_MAX];
+char ast_config_AST_DB[PATH_MAX];
+char ast_config_AST_KEY_DIR[PATH_MAX];
+char ast_config_AST_PID[PATH_MAX];
+char ast_config_AST_SOCKET[PATH_MAX];
+char ast_config_AST_RUN_DIR[PATH_MAX];
+char ast_config_AST_RUN_USER[PATH_MAX];
+char ast_config_AST_RUN_GROUP[PATH_MAX];
+char ast_config_AST_CTL_PERMISSIONS[PATH_MAX];
+char ast_config_AST_CTL_OWNER[PATH_MAX] = "\0";
+char ast_config_AST_CTL_GROUP[PATH_MAX] = "\0";
+char ast_config_AST_CTL[PATH_MAX] = "asterisk.ctl";
char ast_config_AST_SYSTEM_NAME[20] = "";
extern const char *ast_build_hostname;
@@ -657,7 +657,7 @@
/* Close file descriptors and launch system command */
for (x = STDERR_FILENO + 1; x < 4096; x++)
close(x);
- execl("/bin/sh", "/bin/sh", "-c", s, NULL);
+ execl("/bin/sh", "/bin/sh", "-c", s, (char *) NULL);
exit(1);
} else if (pid > 0) {
for(;;) {
Modified: team/murf/AEL-trunk-fixesonly/cdr/cdr_csv.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/cdr/cdr_csv.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/cdr/cdr_csv.c (original)
+++ team/murf/AEL-trunk-fixesonly/cdr/cdr_csv.c Fri Jun 9 17:35:51 2006
@@ -261,7 +261,7 @@
static int writefile(char *s, char *acc)
{
- char tmp[AST_CONFIG_MAX_PATH];
+ char tmp[PATH_MAX];
FILE *f;
if (strchr(acc, '/') || (acc[0] == '.')) {
ast_log(LOG_WARNING, "Account code '%s' insecure for writing file\n", acc);
@@ -282,7 +282,7 @@
{
/* Make sure we have a big enough buf */
char buf[1024];
- char csvmaster[AST_CONFIG_MAX_PATH];
+ char csvmaster[PATH_MAX];
snprintf(csvmaster, sizeof(csvmaster),"%s/%s/%s", ast_config_AST_LOG_DIR, CSV_LOG_DIR, CSV_MASTER);
#if 0
printf("[CDR] %s ('%s' -> '%s') Dur: %ds Bill: %ds Disp: %s Flags: %s Account: [%s]\n", cdr->channel, cdr->src, cdr->dst, cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition), ast_cdr_flags2str(cdr->amaflags), cdr->accountcode);
Modified: team/murf/AEL-trunk-fixesonly/cdr/cdr_custom.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/cdr/cdr_custom.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/cdr/cdr_custom.c (original)
+++ team/murf/AEL-trunk-fixesonly/cdr/cdr_custom.c Fri Jun 9 17:35:51 2006
@@ -63,7 +63,7 @@
static FILE *mf = NULL;
-static char master[AST_CONFIG_MAX_PATH];
+static char master[PATH_MAX];
static char format[1024]="";
static int load_config(int reload)
Modified: team/murf/AEL-trunk-fixesonly/cdr/cdr_radius.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/cdr/cdr_radius.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/cdr/cdr_radius.c (original)
+++ team/murf/AEL-trunk-fixesonly/cdr/cdr_radius.c Fri Jun 9 17:35:51 2006
@@ -88,7 +88,7 @@
static char *name = "radius";
static char *cdr_config = "cdr.conf";
-static char radiuscfg[AST_CONFIG_MAX_PATH] = "/etc/radiusclient-ng/radiusclient.conf";
+static char radiuscfg[PATH_MAX] = "/etc/radiusclient-ng/radiusclient.conf";
static struct ast_flags global_flags = { RADIUS_FLAG_USEGMTIME | RADIUS_FLAG_LOGUNIQUEID | RADIUS_FLAG_LOGUSERFIELD };
Modified: team/murf/AEL-trunk-fixesonly/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/channels/chan_sip.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/channels/chan_sip.c (original)
+++ team/murf/AEL-trunk-fixesonly/channels/chan_sip.c Fri Jun 9 17:35:51 2006
@@ -1704,6 +1704,8 @@
if (p->owner) {
ast_log(LOG_WARNING, "Autodestruct on dialog '%s' with owner in place (Method: %s)\n", p->callid, sip_methods[p->method].text);
ast_queue_hangup(p->owner);
+ } else if (p->refer) {
+ transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);
} else {
sip_destroy(p);
}
@@ -2878,12 +2880,13 @@
if (ast_test_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER)) {
if (option_debug >3)
- ast_log(LOG_DEBUG, "SIP Transfer: Not hanging up right now... Rescheduling hangup.\n");
+ ast_log(LOG_DEBUG, "SIP Transfer: Not hanging up right now... Rescheduling hangup for %s.\n", p->callid);
if (p->autokillid > -1)
sip_cancel_destroy(p);
sip_scheddestroy(p, 32000);
ast_clear_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER); /* Really hang up next time */
ast_clear_flag(&p->flags[0], SIP_NEEDDESTROY);
+ p->owner->tech_pvt = NULL;
p->owner = NULL; /* Owner will be gone after we return, so take it away */
return 0;
}
@@ -2963,8 +2966,26 @@
}
} else { /* Call is in UP state, send BYE */
if (!p->pendinginvite) {
+ char *audioqos = "";
+ char *videoqos = "";
+ if (p->rtp)
+ audioqos = ast_rtp_get_quality(p->rtp);
+ if (p->vrtp)
+ videoqos = ast_rtp_get_quality(p->vrtp);
/* Send a hangup */
transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);
+
+ /* Get RTCP quality before end of call */
+ if (recordhistory) {
+ if (p->rtp)
+ append_history(p, "RTCPaudio", "Quality:%s", audioqos);
+ if (p->vrtp)
+ append_history(p, "RTCPvideo", "Quality:%s", videoqos);
+ }
+ if (p->rtp)
+ pbx_builtin_setvar_helper(p->owner, "RTPAUDIOQOS", audioqos);
+ if (p->vrtp)
+ pbx_builtin_setvar_helper(p->owner, "RTPVIDEOQOS", videoqos);
} else {
/* Note we will need a BYE when this all settles out
but we can't send one while we have "INVITE" outstanding. */
@@ -3101,7 +3122,7 @@
ast_mutex_lock(&p->lock);
append_history(p, "Masq", "Old channel: %s\n", oldchan->name);
- append_history(p, "Masq (cont)", "...new owner: %s\n", p->owner->name);
+ append_history(p, "Masq (cont)", "...new owner: %s\n", newchan->name);
if (p->owner != oldchan)
ast_log(LOG_WARNING, "old channel wasn't %p but was %p\n", oldchan, p->owner);
else {
@@ -3110,16 +3131,6 @@
}
if (option_debug > 2)
ast_log(LOG_DEBUG, "SIP Fixup: New owner for dialogue %s: %s (Old parent: %s)\n", p->callid, p->owner->name, oldchan->name);
- if (p->refer) {
- if (option_debug > 2) {
- if (oldchan->tech_pvt) {
- struct sip_pvt *old = oldchan->tech_pvt;
- ast_log(LOG_DEBUG, "Releasing connection between %s and pvt %s\n", oldchan->name, old->callid);
- } else
- ast_log(LOG_DEBUG, "Hmmm. No sip_pvt to release for %s\n", oldchan->name);
- }
- oldchan->tech_pvt = NULL; /* Release connection between old channel and it's pvt so we can hang up in peace */
- }
ast_mutex_unlock(&p->lock);
return ret;
@@ -3672,14 +3683,15 @@
if (intended_method != SIP_OPTIONS) /* Peerpoke has it's own system */
p->timer_t1 = 500; /* Default SIP retransmission timer T1 (RFC 3261) */
+
if (sin) {
p->sa = *sin;
if (ast_sip_ouraddrfor(&p->sa.sin_addr,&p->ourip))
p->ourip = __ourip;
- } else {
+ } else
p->ourip = __ourip;
- }
-
+
+ /* Copy global flags to this PVT at setup. */
ast_copy_flags(&p->flags[0], &global_flags[0], SIP_FLAGS_TO_COPY);
ast_copy_flags(&p->flags[1], &global_flags[1], SIP_PAGE2_FLAGS_TO_COPY);
@@ -3689,6 +3701,7 @@
if (sip_methods[intended_method].need_rtp) {
p->rtp = ast_rtp_new_with_bindaddr(sched, io, 1, 0, bindaddr.sin_addr);
+ /* If the global videosupport flag is on, we always create a RTP interface for video */
if (ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT))
p->vrtp = ast_rtp_new_with_bindaddr(sched, io, 1, 0, bindaddr.sin_addr);
if (!p->rtp || (ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) && !p->vrtp)) {
@@ -7312,10 +7325,11 @@
/* Find the request URI */
if (req->rlPart2)
ast_copy_string(tmp, req->rlPart2, sizeof(tmp));
- uri = get_in_brackets(tmp);
if (pedanticsipchecking)
ast_uri_decode(tmp);
+
+ uri = get_in_brackets(tmp);
if (strncmp(uri, "sip:", 4)) {
ast_log(LOG_WARNING, "Huh? Not a SIP header (%s)?\n", uri);
@@ -9558,7 +9572,7 @@
ast_log(LOG_DEBUG, " * SIP Call\n");
if (dialog->history)
AST_LIST_TRAVERSE(dialog->history, hist, list)
- ast_log(LOG_DEBUG, " %d. %s\n", ++x, hist->event);
+ ast_log(LOG_DEBUG, " %-3.3d. %s\n", ++x, hist->event);
if (!x)
ast_log(LOG_DEBUG, "Call '%s' has no history\n", dialog->callid);
ast_log(LOG_DEBUG, "\n---------- END SIP HISTORY for '%s' \n", dialog->callid);
@@ -10864,15 +10878,17 @@
/* They got the notify, this is the end */
if (p->owner) {
if (!p->refer) {
- ast_log(LOG_WARNING, "Notify answer on an owned channel?\n");
+ ast_log(LOG_WARNING, "Notify answer on an owned channel? - %s\n", p->owner->name);
ast_queue_hangup(p->owner);
}
} else {
if (p->subscribed == NONE)
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
}
- } else if (sipmethod == SIP_REGISTER)
+ } else if (sipmethod == SIP_REGISTER)
res = handle_response_register(p, resp, rest, req, ignore, seqno);
+ else if (sipmethod == SIP_BYE)
+ ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
break;
case 202: /* Transfer accepted */
if (sipmethod == SIP_REFER)
@@ -11067,7 +11083,7 @@
if (ast_test_flag(req, SIP_PKT_DEBUG))
ast_verbose("SIP Response message for INCOMING dialog %s arrived\n", msg);
- if (resp == 200) {
+ if (sipmethod == SIP_INVITE && resp == 200) {
/* Tags in early session is replaced by the tag in 200 OK, which is
the final reply to our INVITE */
char tag[128];
@@ -11087,14 +11103,16 @@
/* They got the notify, this is the end */
if (p->owner) {
ast_log(LOG_WARNING, "Notify answer on an owned channel?\n");
- ast_queue_hangup(p->owner);
+ //ast_queue_hangup(p->owner);
} else {
- if (!p->subscribed)
+ if (!p->subscribed && !p->refer)
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
}
- /* Wait for 487, then destroy */
- } else if (sipmethod == SIP_MESSAGE)
+ } else if (sipmethod == SIP_BYE)
+ ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+ else if (sipmethod == SIP_MESSAGE)
/* We successfully transmitted a message */
+ /* XXX Why destroy this pvt after message transfer? Bad */
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
break;
case 202: /* Transfer accepted */
@@ -11122,6 +11140,8 @@
if (sipmethod == SIP_INVITE) {
/* Re-invite failed */
handle_response_invite(p, resp, rest, req, seqno);
+ } else if (sipmethod == SIP_BYE) {
+ ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
} else if (sipdebug) {
ast_log (LOG_DEBUG, "Remote host can't match request %s to call '%s'. Giving up\n", sip_methods[sipmethod].text, p->callid);
}
@@ -12620,6 +12640,7 @@
int res;
struct ast_channel *bridged_to;
char iabuf[INET_ADDRSTRLEN];
+ char *audioqos = NULL, *videoqos = NULL;
if (p->pendinginvite && !ast_test_flag(&p->flags[0], SIP_OUTGOING) && !ast_test_flag(req, SIP_PKT_IGNORE))
transmit_response_reliable(p, "487 Request Terminated", &p->initreq);
@@ -12627,11 +12648,29 @@
copy_request(&p->initreq, req);
check_via(p, req);
ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+
+ if (p->rtp)
+ audioqos = ast_rtp_get_quality(p->rtp);
+ if (p->vrtp)
+ videoqos = ast_rtp_get_quality(p->vrtp);
+
+ /* Get RTCP quality before end of call */
+ if (recordhistory) {
+ if (p->rtp)
+ append_history(p, "RTCPaudio", "Quality:%s", audioqos);
+ if (p->vrtp)
+ append_history(p, "RTCPvideo", "Quality:%s", videoqos);
+ }
+
if (p->rtp) {
+ if (p->owner)
+ pbx_builtin_setvar_helper(p->owner, "RTPAUDIOQOS", audioqos);
/* Immediately stop RTP */
ast_rtp_stop(p->rtp);
}
if (p->vrtp) {
+ if (p->owner)
+ pbx_builtin_setvar_helper(p->owner, "RTPVIDEOQOS", videoqos);
/* Immediately stop VRTP */
ast_rtp_stop(p->vrtp);
}
@@ -13701,6 +13740,8 @@
if (create_addr(p, host)) {
*cause = AST_CAUSE_UNREGISTERED;
+ if (option_debug > 2)
+ ast_log(LOG_DEBUG, "Cant create SIP call - target device not registred\n");
sip_destroy(p);
return NULL;
}
Modified: team/murf/AEL-trunk-fixesonly/codecs/gsm/src/preprocess.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/codecs/gsm/src/preprocess.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/codecs/gsm/src/preprocess.c (original)
+++ team/murf/AEL-trunk-fixesonly/codecs/gsm/src/preprocess.c Fri Jun 9 17:35:51 2006
@@ -36,19 +36,13 @@
word * s,
word * so ) /* [0..159] IN/OUT */
{
-
- word z1 = S->z1;
- longword L_z2 = S->L_z2;
- word mp = S->mp;
-
+ word z1 = S->z1;
+ longword L_z2 = S->L_z2;
+ word mp = S->mp;
word s1;
-
-
word SO;
-
ulongword utmp; /* for L_ADD */
-
- register int k = 160;
+ register int k = 160;
while (k--) {
Modified: team/murf/AEL-trunk-fixesonly/doc/channelvariables.txt
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/doc/channelvariables.txt?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/doc/channelvariables.txt (original)
+++ team/murf/AEL-trunk-fixesonly/doc/channelvariables.txt Fri Jun 9 17:35:51 2006
@@ -710,6 +710,8 @@
${SIPURI} * SIP uri
${SIP_CODEC} Set the SIP codec for a call
${SIP_URI_OPTIONS} * additional options to add to the URI for an outgoing call
+${RTPAUDIOQOS} RTCP QoS report for the audio of this call
+${RTPVIDEOQOS} RTCP QoS report for the video of this call
The Agent channel uses the following variables:
---------------------------------------------------------
Modified: team/murf/AEL-trunk-fixesonly/include/asterisk.h
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/include/asterisk.h?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/include/asterisk.h (original)
+++ team/murf/AEL-trunk-fixesonly/include/asterisk.h Fri Jun 9 17:35:51 2006
@@ -22,32 +22,32 @@
#include "asterisk/compat.h"
+#include <limits.h>
+
#define DEFAULT_LANGUAGE "en"
#define DEFAULT_SAMPLE_RATE 8000
#define DEFAULT_SAMPLES_PER_MS ((DEFAULT_SAMPLE_RATE)/1000)
-#define AST_CONFIG_MAX_PATH 255
-
/* provided in asterisk.c */
-extern char ast_config_AST_CONFIG_DIR[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_CONFIG_FILE[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_MODULE_DIR[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_SPOOL_DIR[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_MONITOR_DIR[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_VAR_DIR[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_DATA_DIR[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_LOG_DIR[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_AGI_DIR[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_DB[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_KEY_DIR[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_PID[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_SOCKET[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_RUN_DIR[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_CTL_PERMISSIONS[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_CTL_OWNER[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_CTL_GROUP[AST_CONFIG_MAX_PATH];
-extern char ast_config_AST_CTL[AST_CONFIG_MAX_PATH];
+extern char ast_config_AST_CONFIG_DIR[PATH_MAX];
+extern char ast_config_AST_CONFIG_FILE[PATH_MAX];
+extern char ast_config_AST_MODULE_DIR[PATH_MAX];
+extern char ast_config_AST_SPOOL_DIR[PATH_MAX];
+extern char ast_config_AST_MONITOR_DIR[PATH_MAX];
+extern char ast_config_AST_VAR_DIR[PATH_MAX];
+extern char ast_config_AST_DATA_DIR[PATH_MAX];
+extern char ast_config_AST_LOG_DIR[PATH_MAX];
+extern char ast_config_AST_AGI_DIR[PATH_MAX];
+extern char ast_config_AST_DB[PATH_MAX];
+extern char ast_config_AST_KEY_DIR[PATH_MAX];
+extern char ast_config_AST_PID[PATH_MAX];
+extern char ast_config_AST_SOCKET[PATH_MAX];
+extern char ast_config_AST_RUN_DIR[PATH_MAX];
+extern char ast_config_AST_CTL_PERMISSIONS[PATH_MAX];
+extern char ast_config_AST_CTL_OWNER[PATH_MAX];
+extern char ast_config_AST_CTL_GROUP[PATH_MAX];
+extern char ast_config_AST_CTL[PATH_MAX];
extern char ast_config_AST_SYSTEM_NAME[20];
int ast_set_priority(int); /*!< Provided by asterisk.c */
Modified: team/murf/AEL-trunk-fixesonly/include/asterisk/endian.h
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/include/asterisk/endian.h?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/include/asterisk/endian.h (original)
+++ team/murf/AEL-trunk-fixesonly/include/asterisk/endian.h Fri Jun 9 17:35:51 2006
@@ -33,9 +33,6 @@
#ifdef __linux__
#include <endian.h>
#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
-#if defined(__OpenBSD__)
-#include <machine/types.h>
-#endif /* __OpenBSD__ */
#include <machine/endian.h>
#define __BYTE_ORDER BYTE_ORDER
#define __LITTLE_ENDIAN LITTLE_ENDIAN
Modified: team/murf/AEL-trunk-fixesonly/include/asterisk/rtp.h
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/include/asterisk/rtp.h?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/include/asterisk/rtp.h (original)
+++ team/murf/AEL-trunk-fixesonly/include/asterisk/rtp.h Fri Jun 9 17:35:51 2006
@@ -66,19 +66,6 @@
#define FLAG_3389_WARNING (1 << 0)
typedef int (*ast_rtp_callback)(struct ast_rtp *rtp, struct ast_frame *f, void *data);
-
-
-/*!
- * \brief Structure representing a RTP session.
- *
- * RTP session is defined on page 9 of RFC 3550: "An association among a set of participants communicating with RTP. A participant may be involved in multiple RTP sessions at the same time [...]"
- *
- */
-/*! \brief The value of each payload format mapping: */
-struct rtpPayloadType {
- int isAstFormat; /*!< whether the following code is an AST_FORMAT */
- int code;
-};
/*!
* \brief Get the amount of space required to hold an RTP session
Modified: team/murf/AEL-trunk-fixesonly/include/asterisk/stringfields.h
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/include/asterisk/stringfields.h?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/include/asterisk/stringfields.h (original)
+++ team/murf/AEL-trunk-fixesonly/include/asterisk/stringfields.h Fri Jun 9 17:35:51 2006
@@ -171,7 +171,7 @@
\brief Declare a string field
\param name The field name
*/
-#define AST_STRING_FIELD(name) const ast_string_field name;
+#define AST_STRING_FIELD(name) const ast_string_field name
/*!
\brief Declare the fields needed in a structure
@@ -181,7 +181,7 @@
ast_string_field __begin_field[0]; \
field_list \
ast_string_field __end_field[0]; \
- struct ast_string_field_mgr __field_mgr;
+ struct ast_string_field_mgr __field_mgr
/*!
\brief Get the number of string fields in a structure
Modified: team/murf/AEL-trunk-fixesonly/logger.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/logger.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/logger.c (original)
+++ team/murf/AEL-trunk-fixesonly/logger.c Fri Jun 9 17:35:51 2006
@@ -378,8 +378,8 @@
int reload_logger(int rotate)
{
- char old[AST_CONFIG_MAX_PATH] = "";
- char new[AST_CONFIG_MAX_PATH];
+ char old[PATH_MAX] = "";
+ char new[PATH_MAX];
int event_rotate = rotate, queue_rotate = rotate;
struct logchannel *f;
FILE *myf;
Modified: team/murf/AEL-trunk-fixesonly/pbx/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/pbx/Makefile?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/pbx/Makefile (original)
+++ team/murf/AEL-trunk-fixesonly/pbx/Makefile Fri Jun 9 17:35:51 2006
@@ -65,7 +65,7 @@
$(CC) $(CFLAGS) -I. -c -o ael/aelbison.o ael/ael.tab.c
ael/ael_lex.c:
- (cd ael; flex ael.flex)
+ (cd ael; flex ael.flex; sed -i -e "/begin standard C headers/i#include \"asterisk.h\"" ael_lex.c)
ael/ael.tab.c ael/ael.tab.h:
(cd ael; bison -v -d ael.y)
Modified: team/murf/AEL-trunk-fixesonly/pbx/ael/ael.flex
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/pbx/ael/ael.flex?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/pbx/ael/ael.flex (original)
+++ team/murf/AEL-trunk-fixesonly/pbx/ael/ael.flex Fri Jun 9 17:35:51 2006
@@ -56,8 +56,6 @@
%option bison-locations
%{
-#include "asterisk.h"
-
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
@@ -65,6 +63,7 @@
#include <unistd.h>
#include "asterisk/logger.h"
+#include "asterisk/utils.h"
#include "ael/ael.tab.h"
#include "asterisk/ael_structs.h"
@@ -402,13 +401,10 @@
if ( !error ) { /* valid file name */
*p2 = 0;
/* relative vs. absolute */
- if ( *(p1+1) != '/' ) {
- /* XXX must check overflows */
- strcpy(fnamebuf,ast_config_AST_CONFIG_DIR);
- strcat(fnamebuf,"/");
- strcat(fnamebuf,p1+1);
- } else
- strcpy(fnamebuf,p1+1);
+ if (*(p1+1) != '/')
+ snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
+ else
+ ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));
in1 = fopen( fnamebuf, "r" );
if ( ! in1 ) {
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
Modified: team/murf/AEL-trunk-fixesonly/pbx/ael/ael_lex.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL-trunk-fixesonly/pbx/ael/ael_lex.c?rev=33396&r1=33395&r2=33396&view=diff
==============================================================================
--- team/murf/AEL-trunk-fixesonly/pbx/ael/ael_lex.c (original)
+++ team/murf/AEL-trunk-fixesonly/pbx/ael/ael_lex.c Fri Jun 9 17:35:51 2006
@@ -16,6 +16,7 @@
/* First, we deal with platform-specific or compiler-specific issues. */
+#include "asterisk.h"
/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
@@ -660,8 +661,6 @@
* bison-locations is probably not needed.
*/
#line 59 "ael.flex"
-#include "asterisk.h"
-
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
@@ -669,6 +668,7 @@
#include <unistd.h>
#include "asterisk/logger.h"
+#include "asterisk/utils.h"
#include "ael/ael.tab.h"
#include "asterisk/ael_structs.h"
@@ -766,7 +766,7 @@
#define STORE_POS
#define STORE_LOC
#endif
-#line 767 "ael_lex.c"
+#line 781 "ael_lex.c"
#define INITIAL 0
#define paren 1
@@ -1000,10 +1000,10 @@
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 171 "ael.flex"
-
-
-#line 1004 "ael_lex.c"
+#line 173 "ael.flex"
+
+
+#line 1024 "ael_lex.c"
yylval = yylval_param;
@@ -1094,218 +1094,218 @@
case 1:
YY_RULE_SETUP
-#line 173 "ael.flex"
+#line 175 "ael.flex"
{ STORE_POS; return LC;}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 174 "ael.flex"
+#line 176 "ael.flex"
{ STORE_POS; return RC;}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 175 "ael.flex"
+#line 177 "ael.flex"
{ STORE_POS; return LP;}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 176 "ael.flex"
+#line 178 "ael.flex"
{ STORE_POS; return RP;}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 177 "ael.flex"
+#line 179 "ael.flex"
{ STORE_POS; return SEMI;}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 178 "ael.flex"
+#line 180 "ael.flex"
{ STORE_POS; return EQ;}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 179 "ael.flex"
+#line 181 "ael.flex"
{ STORE_POS; return COMMA;}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 180 "ael.flex"
+#line 182 "ael.flex"
{ STORE_POS; return COLON;}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 181 "ael.flex"
+#line 183 "ael.flex"
{ STORE_POS; return AMPER;}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 182 "ael.flex"
+#line 184 "ael.flex"
{ STORE_POS; return BAR;}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 183 "ael.flex"
+#line 185 "ael.flex"
{ STORE_POS; return EXTENMARK;}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 184 "ael.flex"
+#line 186 "ael.flex"
{ STORE_POS; return AT;}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 185 "ael.flex"
+#line 187 "ael.flex"
{/*comment*/}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 186 "ael.flex"
+#line 188 "ael.flex"
{ STORE_POS; return KW_CONTEXT;}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 187 "ael.flex"
+#line 189 "ael.flex"
{ STORE_POS; return KW_ABSTRACT;}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 188 "ael.flex"
+#line 190 "ael.flex"
{ STORE_POS; return KW_MACRO;};
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 189 "ael.flex"
+#line 191 "ael.flex"
{ STORE_POS; return KW_GLOBALS;}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 190 "ael.flex"
+#line 192 "ael.flex"
{ STORE_POS; return KW_IGNOREPAT;}
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 191 "ael.flex"
+#line 193 "ael.flex"
{ STORE_POS; return KW_SWITCH;}
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 192 "ael.flex"
+#line 194 "ael.flex"
{ STORE_POS; return KW_IF;}
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 193 "ael.flex"
+#line 195 "ael.flex"
{ STORE_POS; return KW_IFTIME;}
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 194 "ael.flex"
+#line 196 "ael.flex"
{ STORE_POS; return KW_RANDOM;}
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 195 "ael.flex"
+#line 197 "ael.flex"
{ STORE_POS; return KW_REGEXTEN;}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 196 "ael.flex"
+#line 198 "ael.flex"
{ STORE_POS; return KW_HINT;}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 197 "ael.flex"
+#line 199 "ael.flex"
{ STORE_POS; return KW_ELSE;}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 198 "ael.flex"
+#line 200 "ael.flex"
{ STORE_POS; return KW_GOTO;}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 199 "ael.flex"
+#line 201 "ael.flex"
{ STORE_POS; return KW_JUMP;}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 200 "ael.flex"
+#line 202 "ael.flex"
{ STORE_POS; return KW_RETURN;}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 201 "ael.flex"
+#line 203 "ael.flex"
{ STORE_POS; return KW_BREAK;}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 202 "ael.flex"
+#line 204 "ael.flex"
{ STORE_POS; return KW_CONTINUE;}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 203 "ael.flex"
+#line 205 "ael.flex"
{ STORE_POS; return KW_FOR;}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 204 "ael.flex"
+#line 206 "ael.flex"
{ STORE_POS; return KW_WHILE;}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 205 "ael.flex"
+#line 207 "ael.flex"
{ STORE_POS; return KW_CASE;}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 206 "ael.flex"
+#line 208 "ael.flex"
{ STORE_POS; return KW_DEFAULT;}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 207 "ael.flex"
+#line 209 "ael.flex"
{ STORE_POS; return KW_PATTERN;}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 208 "ael.flex"
+#line 210 "ael.flex"
{ STORE_POS; return KW_CATCH;}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 209 "ael.flex"
+#line 211 "ael.flex"
{ STORE_POS; return KW_SWITCHES;}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 210 "ael.flex"
+#line 212 "ael.flex"
{ STORE_POS; return KW_ESWITCHES;}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 211 "ael.flex"
+#line 213 "ael.flex"
{ STORE_POS; return KW_INCLUDES;}
YY_BREAK
case 40:
/* rule 40 can match eol */
YY_RULE_SETUP
-#line 213 "ael.flex"
+#line 215 "ael.flex"
{ my_lineno++; my_col = 1; }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 214 "ael.flex"
+#line 216 "ael.flex"
{ my_col += yyleng; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 215 "ael.flex"
+#line 217 "ael.flex"
{ my_col += (yyleng*8)-(my_col%8); }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 217 "ael.flex"
+#line 219 "ael.flex"
{
STORE_POS;
yylval->str = strdup(yytext);
@@ -1323,7 +1323,7 @@
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
-#line 233 "ael.flex"
+#line 235 "ael.flex"
{
if ( pbcpop(')') ) { /* error */
STORE_LOC;
@@ -1349,7 +1349,7 @@
case 45:
/* rule 45 can match eol */
YY_RULE_SETUP
-#line 255 "ael.flex"
+#line 257 "ael.flex"
{
char c = yytext[yyleng-1];
if (c == '(')
@@ -1361,7 +1361,7 @@
case 46:
/* rule 46 can match eol */
YY_RULE_SETUP
-#line 263 "ael.flex"
+#line 265 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop(c)) { /* error */
@@ -1386,7 +1386,7 @@
case 47:
/* rule 47 can match eol */
YY_RULE_SETUP
-#line 285 "ael.flex"
+#line 287 "ael.flex"
{
char c = yytext[yyleng-1];
if (c == '(')
@@ -1398,7 +1398,7 @@
case 48:
/* rule 48 can match eol */
YY_RULE_SETUP
-#line 293 "ael.flex"
+#line 295 "ael.flex"
{
if ( pbcpop(')') ) { /* error */
STORE_LOC;
@@ -1426,7 +1426,7 @@
case 49:
/* rule 49 can match eol */
YY_RULE_SETUP
-#line 317 "ael.flex"
+#line 319 "ael.flex"
{
if( parencount != 0) { /* printf("Folding in a comma!\n"); */
yymore();
@@ -1444,7 +1444,7 @@
case 50:
/* rule 50 can match eol */
YY_RULE_SETUP
-#line 331 "ael.flex"
+#line 333 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop(c) ) { /* error */
@@ -1465,7 +1465,7 @@
case 51:
/* rule 51 can match eol */
YY_RULE_SETUP
-#line 348 "ael.flex"
+#line 350 "ael.flex"
{
char c = yytext[yyleng-1];
yymore();
@@ -1475,7 +1475,7 @@
case 52:
/* rule 52 can match eol */
YY_RULE_SETUP
-#line 354 "ael.flex"
+#line 356 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop(c) ) { /* error */
@@ -1491,7 +1491,7 @@
case 53:
/* rule 53 can match eol */
YY_RULE_SETUP
-#line 366 "ael.flex"
+#line 368 "ael.flex"
{
STORE_LOC;
yylval->str = strdup(yytext);
@@ -1504,7 +1504,7 @@
case 54:
/* rule 54 can match eol */
YY_RULE_SETUP
-#line 375 "ael.flex"
+#line 377 "ael.flex"
{
FILE *in1;
char fnamebuf[1024],*p1,*p2;
@@ -1532,13 +1532,10 @@
if ( !error ) { /* valid file name */
*p2 = 0;
/* relative vs. absolute */
- if ( *(p1+1) != '/' ) {
- /* XXX must check overflows */
- strcpy(fnamebuf,ast_config_AST_CONFIG_DIR);
- strcat(fnamebuf,"/");
- strcat(fnamebuf,p1+1);
- } else
- strcpy(fnamebuf,p1+1);
+ if (*(p1+1) != '/')
+ snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
+ else
+ ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));
[... 126 lines stripped ...]
More information about the svn-commits
mailing list