more minor fixes thanks Julian on pointing out
authorMatt O'Gorman <mogorman@digium.com>
Thu, 1 Jun 2006 18:48:22 +0000 (18:48 +0000)
committerMatt O'Gorman <mogorman@digium.com>
Thu, 1 Jun 2006 18:48:22 +0000 (18:48 +0000)
potential problems

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

res/res_jabber.c

index 71a6055..dde2ecd 100644 (file)
@@ -342,9 +342,7 @@ static int aji_status_exec(struct ast_channel *chan, void *data)
                if (!strcasecmp(iterator->user, screenname)) {
                        found = 1; 
                        r = iterator->resources; 
-                       if (!r) {       /* client hasnt signed on */
-                               break;
-                       } else {
+                       if (r) {        /* client has signed on */
                                if (resource) {
                                        while (r) {
                                                if (!strcasecmp(r->resource, resource)) {
@@ -353,7 +351,9 @@ static int aji_status_exec(struct ast_channel *chan, void *data)
                                                }
                                                r = r->next;
                                        }
+                                       if(stat != 7) break;
                                        ast_log(LOG_WARNING, "Resource not found %s\n", resource);
+                                       break;
                                } else {
                                        stat = r->status; 
                                        break;