Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/jabglue.c @ 562:7fc678ac3bc6
Cosmetic changes
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 02 Dec 2005 23:10:34 +0100 |
parents | 64cb4de94972 |
children | eb1df2371581 |
comparison
equal
deleted
inserted
replaced
561:a2eec8294093 | 562:7fc678ac3bc6 |
---|---|
939 p = xmlnode_get_attrib(x, "xmlns"); if (p) ns = p; | 939 p = xmlnode_get_attrib(x, "xmlns"); if (p) ns = p; |
940 | 940 |
941 if (!strcmp(ns, NS_ROSTER)) { | 941 if (!strcmp(ns, NS_ROSTER)) { |
942 gotroster(x); | 942 gotroster(x); |
943 } else if (!strcmp(ns, NS_AGENTS)) { | 943 } else if (!strcmp(ns, NS_AGENTS)) { |
944 for (y = xmlnode_get_tag(x, "agent"); y; y = xmlnode_get_nextsibling(y)) { | 944 y = xmlnode_get_tag(x, "agent"); |
945 for (; y; y = xmlnode_get_nextsibling(y)) { | |
945 const char *alias = xmlnode_get_attrib(y, "jid"); | 946 const char *alias = xmlnode_get_attrib(y, "jid"); |
946 | 947 |
947 if (alias) { | 948 if (alias) { |
948 const char *name = xmlnode_get_tag_data(y, "name"); | 949 const char *name = xmlnode_get_tag_data(y, "name"); |
949 const char *desc = xmlnode_get_tag_data(y, "description"); | 950 const char *desc = xmlnode_get_tag_data(y, "description"); |
956 else if (xmlnode_get_tag(y, "search")) atype = search; | 957 else if (xmlnode_get_tag(y, "search")) atype = search; |
957 | 958 |
958 if (atype == transport) { | 959 if (atype == transport) { |
959 char *cleanjid = jidtodisp(alias); | 960 char *cleanjid = jidtodisp(alias); |
960 roster_add_user(cleanjid, NULL, JABBER_AGENT_GROUP, | 961 roster_add_user(cleanjid, NULL, JABBER_AGENT_GROUP, |
961 ROSTER_TYPE_AGENT); | 962 ROSTER_TYPE_AGENT); |
962 g_free(cleanjid); | 963 g_free(cleanjid); |
963 } | 964 } |
964 if (alias && name && desc) { | 965 if (alias && name && desc) { |
965 scr_LogPrint(LPRINT_LOGNORM, | 966 scr_LogPrint(LPRINT_LOGNORM, |
966 "Agent: %s / %s / %s / type=%d", | 967 "Agent: %s / %s / %s / type=%d", |