]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Backport GCC 4.2 fixes. Without these Asterisk won't build under devmode using GCC...
authorJoshua Colp <jcolp@digium.com>
Wed, 18 Jul 2007 20:00:23 +0000 (20:00 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 18 Jul 2007 20:00:23 +0000 (20:00 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75712 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c
channels/chan_agent.c
channels/chan_sip.c
pbx/pbx_realtime.c

index 891acf1ee9fffe36ec7e55543e3439b129cc73c4..c3827747de74e2b36e4b8875374fe4117ff7cf1b 100644 (file)
@@ -553,12 +553,9 @@ static void populate_defaults(struct ast_vm_user *vmu)
        ast_copy_flags(vmu, (&globalflags), AST_FLAGS_ALL);     
        if (saydurationminfo)
                vmu->saydurationm = saydurationminfo;
-       if (callcontext)
-               ast_copy_string(vmu->callback, callcontext, sizeof(vmu->callback));
-       if (dialcontext)
-               ast_copy_string(vmu->dialout, dialcontext, sizeof(vmu->dialout));
-       if (exitcontext)
-               ast_copy_string(vmu->exit, exitcontext, sizeof(vmu->exit));
+       ast_copy_string(vmu->callback, callcontext, sizeof(vmu->callback));
+       ast_copy_string(vmu->dialout, dialcontext, sizeof(vmu->dialout));
+       ast_copy_string(vmu->exit, exitcontext, sizeof(vmu->exit));
        if (maxmsg)
                vmu->maxmsg = maxmsg;
        vmu->volgain = volgain;
index 4675ffdd6f7b715917d7b53b1940304cbb6aa563..4ebf9e1202640bb6c64cd8237a6b3d5d020b78bb 100644 (file)
@@ -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
index adf9f74d04dba519fbe6caef57c2954846a1303b..8a63a25a7c98b9713e4b65b3c6f5d11aaccf8f0f 100644 (file)
@@ -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);
index 9ee770c99acc2960d131e5ad40233d8d5551f5d4..d1011fe8ebb159c3a7aaf31305c1b3c171bcb39e 100644 (file)
@@ -211,7 +211,7 @@ static int realtime_exec(struct ast_channel *chan, const char *context, const ch
                                                          "Application: %s\r\n"
                                                          "AppData: %s\r\n"
                                                          "Uniqueid: %s\r\n",
-                                                         chan->name, chan->context, chan->exten, chan->priority, app, appdata ? appdata : "(NULL)", chan->uniqueid);
+                                                         chan->name, chan->context, chan->exten, chan->priority, app, !ast_strlen_zero(appdata) ? appdata : "(NULL)", chan->uniqueid);
                                
                                res = pbx_exec(chan, a, appdata);
                        } else