]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
don't crash on log message in solaris
authorDavid Vossel <dvossel@digium.com>
Tue, 10 Nov 2009 18:01:41 +0000 (18:01 +0000)
committerDavid Vossel <dvossel@digium.com>
Tue, 10 Nov 2009 18:01:41 +0000 (18:01 +0000)
AST-2009-006

(closes issue 0016206)
Reported by: bklang
Tested by: bklang

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@229235 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 8ef382af735d9a09981e69dd865fa5c00435d6ac..2b15d056d5f32fbbc191917e440fe0aae8f7f599 100644 (file)
@@ -4037,7 +4037,7 @@ static int handle_call_token(struct ast_iax2_full_hdr *fh, struct iax_ies *ies,
        /* ----- Case 3 ----- */
        } else { /* calltokens are not supported for this client, how do we respond? */
                if (calltoken_required(sin, ies->username, subclass)) {
-                       ast_log(LOG_ERROR, "Call rejected, CallToken Support required. If unexpected, resolve by placing address %s in the calltokenignore list or setting user %s requirecalltoken=no\n", ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr), ies->username);
+                       ast_log(LOG_ERROR, "Call rejected, CallToken Support required. If unexpected, resolve by placing address %s in the calltokenignore list or setting user %s requirecalltoken=no\n", ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr), ast_strlen_zero(ies->username) ? "guest" : ies->username);
                        goto reject;
                }
                return 0; /* calltoken is not required for this addr, so permit it. */