summaryrefslogtreecommitdiff
path: root/emacs/xml_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/xml_interface.c')
-rw-r--r--emacs/xml_interface.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/emacs/xml_interface.c b/emacs/xml_interface.c
index 2541281..92e8c5f 100644
--- a/emacs/xml_interface.c
+++ b/emacs/xml_interface.c
@@ -140,6 +140,17 @@ void req_process (rexmpp_t *s,
xmlNodeAddContent(rep, payload_str);
free(payload_str);
}
+ if (rexmpp_xml_match(child, NULL, "get-name")) {
+ char *jid = xmlNodeGetContent(child);
+ if (jid != NULL) {
+ char *name = rexmpp_get_name(s, jid);
+ if (name != NULL) {
+ xmlNodeAddContent(rep, name);
+ free(name);
+ }
+ free(jid);
+ }
+ }
print_xml(rep);
xmlFreeNode(rep);
return;
@@ -234,7 +245,7 @@ int my_xml_out_cb (rexmpp_t *s, xmlNodePtr node) {
}
-main (int argc, char **argv) {
+int main (int argc, char **argv) {
/* The minimal initialisation: provide an allocated rexmpp_t
structure and an initial jid. */