aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-18 20:00:23 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-18 20:00:23 +0000
commitb04467f5e390f79c1a9a805c62b3d33e694386ca (patch)
treebdb6fd0e6fa57e9fd1f3c98a264dd2be73dddfd2 /channels
parentb2bbc5bc21a3e1a316872ba13d4659c668b136b2 (diff)
Backport GCC 4.2 fixes. Without these Asterisk won't build under devmode using GCC 4.2.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@75712 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_agent.c4
-rw-r--r--channels/chan_sip.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 4675ffdd6..4ebf9e120 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -411,10 +411,10 @@ static int __agent_start_monitoring(struct ast_channel *ast, struct agent_pvt *p
/* substitute . for - */
if ((pointer = strchr(filename, '.')))
*pointer = '-';
- snprintf(tmp, sizeof(tmp), "%s%s",savecallsin ? savecallsin : "", filename);
+ snprintf(tmp, sizeof(tmp), "%s%s", savecallsin, filename);
ast_monitor_start(ast, recordformat, tmp, needlock);
ast_monitor_setjoinfiles(ast, 1);
- snprintf(tmp2, sizeof(tmp2), "%s%s.%s", urlprefix ? urlprefix : "", filename, recordformatext);
+ snprintf(tmp2, sizeof(tmp2), "%s%s.%s", urlprefix, filename, recordformatext);
#if 0
ast_verbose("name is %s, link is %s\n",tmp, tmp2);
#endif
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index adf9f74d0..8a63a25a7 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4553,7 +4553,7 @@ static int sip_register(char *value, int lineno)
regobjs++;
ASTOBJ_INIT(reg);
ast_string_field_set(reg, contact, contact);
- if (username)
+ if (!ast_strlen_zero(username))
ast_string_field_set(reg, username, username);
if (hostname)
ast_string_field_set(reg, hostname, hostname);