- ASTOBJ_CONTAINER_TRAVERSE(&client->buddies, 1, {
- ASTOBJ_RDLOCK(iterator);
- if (!strcasecmp(iterator->user, screenname)) {
- found = 1;
- r = iterator->resources;
- if (r) { /* client has signed on */
- if (resource) {
- while (r) {
- if (!strcasecmp(r->resource, resource)) {
- stat = r->status;
- }
- r = r->next;
- }
- if (stat == 7) ast_log(LOG_NOTICE, "Resource not found %s\n", resource);
- } else {
- stat = r->status;
- }
- }
- }
- ASTOBJ_UNLOCK(iterator);
- });
-
- if (!found) { /* just a label */