diff options
author | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-04 16:56:16 +0000 |
---|---|---|
committer | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-04 16:56:16 +0000 |
commit | da4994e4b8eeb4392849044fa53c247c9846fb8e (patch) | |
tree | b2555c099e6fb6262d9f78244a319f14f5ca47e4 /res | |
parent | 3e24132b576496686b4099af0fa08135c0a3f260 (diff) |
solves some issues with jabberstatus app
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32040 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_jabber.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/res/res_jabber.c b/res/res_jabber.c index dde2ecdef..52b7c1d1c 100644 --- a/res/res_jabber.c +++ b/res/res_jabber.c @@ -325,7 +325,11 @@ static int aji_status_exec(struct ast_channel *chan, void *data) return -1; } - resource = strsep(&screenname, "/"); + if(!strchr(screename, '/')) { + resource = NULL; + } else { + resource = strsep(&screenname, "/"); + } client = ast_aji_get_client(sender); if (!client) { @@ -347,16 +351,12 @@ static int aji_status_exec(struct ast_channel *chan, void *data) while (r) { if (!strcasecmp(r->resource, resource)) { stat = r->status; - break; } r = r->next; } - if(stat != 7) break; - ast_log(LOG_WARNING, "Resource not found %s\n", resource); - break; + if (stat == 7) ast_log(LOG_NOTICE, "Resource not found %s\n", resource); } else { stat = r->status; - break; } } } |