static char test_usage[] =
"Usage: JABBER test [client]\n"
-" Sends test massage for debugging purposes. A specific client\n"
+" Sends test message for debugging purposes. A specific client\n"
" as configured in jabber.conf can be optionally specified.\n";
static struct ast_cli_entry aji_cli[] = {
while ((tmp = obj->resources)) {
obj->resources = obj->resources->next;
+ free(tmp->description);
free(tmp);
}
int status, priority;
struct aji_buddy *buddy = NULL;
struct aji_resource *tmp = NULL, *last = NULL, *found = NULL;
- char *ver, *node;
+ char *ver, *node, *descrip;
if(client->state != AJI_CONNECTED) {
buddy = (struct aji_buddy *) malloc(sizeof(struct aji_buddy));
status = (pak->show) ? pak->show : 6;
priority = atoi((iks_find_cdata(pak->x, "priority")) ? iks_find_cdata(pak->x, "priority") : "0");
tmp = buddy->resources;
+ descrip = ast_strdup(iks_find_cdata(pak->x,"status"));
while (tmp) {
if (!strcasecmp(tmp->resource, pak->from->resource)) {
tmp->status = status;
+ if (tmp->description) free(tmp->description);
+ tmp->description = descrip;
found = tmp;
if (status == 6) { /* Sign off Destroy resource */
if (last && found->next) {
}
ast_copy_string(found->resource, pak->from->resource, sizeof(found->resource));
found->status = status;
+ found->description = descrip;
found->priority = priority;
found->next = NULL;
last = NULL;