Index: chan_agent.c =================================================================== --- chan_agent.c (revision 65397) +++ chan_agent.c (working copy) @@ -1796,7 +1796,7 @@ ast_copy_string(agent_goodbye, agentgoodbye, sizeof(agent_goodbye)); /* Set Channel Specific Login Overrides */ - if (pbx_builtin_getvar_helper(chan, "AGENTLMAXLOGINTRIES") && strlen(pbx_builtin_getvar_helper(chan, "AGENTLMAXLOGINTRIES"))) { + if (pbx_builtin_getvar_helper(chan, "AGENTLMAXLOGINTRIES") && !ast_strlen_zero(pbx_builtin_getvar_helper(chan, "AGENTLMAXLOGINTRIES"))) { max_login_tries = atoi(pbx_builtin_getvar_helper(chan, "AGENTMAXLOGINTRIES")); if (max_login_tries < 0) max_login_tries = 0; @@ -1875,7 +1875,7 @@ p->lastdisc.tv_sec++; /* Set Channel Specific Agent Overrides */ - if (pbx_builtin_getvar_helper(chan, "AGENTACKCALL") && strlen(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"))) { + if (pbx_builtin_getvar_helper(chan, "AGENTACKCALL") && !ast_strlen_zero(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"))) { if (!strcasecmp(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"), "always")) p->ackcall = 2; else if (ast_true(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"))) @@ -1886,7 +1886,7 @@ if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Saw variable AGENTACKCALL=%s, setting ackcall to: %d for Agent '%s'.\n",tmpoptions,p->ackcall,p->agent); } - if (pbx_builtin_getvar_helper(chan, "AGENTAUTOLOGOFF") && strlen(pbx_builtin_getvar_helper(chan, "AGENTAUTOLOGOFF"))) { + if (pbx_builtin_getvar_helper(chan, "AGENTAUTOLOGOFF") && !ast_strlen_zero(pbx_builtin_getvar_helper(chan, "AGENTAUTOLOGOFF"))) { p->autologoff = atoi(pbx_builtin_getvar_helper(chan, "AGENTAUTOLOGOFF")); if (p->autologoff < 0) p->autologoff = 0; @@ -1894,7 +1894,7 @@ if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Saw variable AGENTAUTOLOGOFF=%s, setting autologff to: %d for Agent '%s'.\n",tmpoptions,p->autologoff,p->agent); } - if (pbx_builtin_getvar_helper(chan, "AGENTWRAPUPTIME") && strlen(pbx_builtin_getvar_helper(chan, "AGENTWRAPUPTIME"))) { + if (pbx_builtin_getvar_helper(chan, "AGENTWRAPUPTIME") && !ast_strlen_zero(pbx_builtin_getvar_helper(chan, "AGENTWRAPUPTIME"))) { p->wrapuptime = atoi(pbx_builtin_getvar_helper(chan, "AGENTWRAPUPTIME")); if (p->wrapuptime < 0) p->wrapuptime = 0;