diff options
author | Joshua Colp <jcolp@digium.com> | 2013-03-12 20:07:10 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2013-03-12 20:07:10 +0000 |
commit | 9a992c6cba9d0245898bf6f3b7b1d174e53da95a (patch) | |
tree | ecc7581fbaedbea7e05757bfd0052c332e17d81e /res/res_xmpp.c | |
parent | 1cb917096b4429eb521002c7a78cc585376b039a (diff) |
Fix a crash when res_xmpp is configured using a username without a domain.
(closes issue ASTERISK-21156)
Reported by: amsoft2001
........
Merged revisions 382923 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_xmpp.c')
-rw-r--r-- | res/res_xmpp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_xmpp.c b/res/res_xmpp.c index 966432dc0..d9c07255d 100644 --- a/res/res_xmpp.c +++ b/res/res_xmpp.c @@ -3772,8 +3772,8 @@ static int xmpp_client_config_post_apply(void *obj, void *arg, int flags) cfg->client->jid = iks_id_new(cfg->client->stack, cfg->user); } - if (!cfg->client->jid) { - ast_log(LOG_ERROR, "Jabber identity could not be created for client '%s' - client not active\n", cfg->name); + if (!cfg->client->jid || ast_strlen_zero(cfg->client->jid->user)) { + ast_log(LOG_ERROR, "Jabber identity '%s' could not be created for client '%s' - client not active\n", cfg->user, cfg->name); return -1; } |