From 439f9223101a040e5d285e870bbcfab139571378 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 10 Sep 2013 12:53:15 +0200 Subject: [PATCH] Fix wrong contact being written in presence XML. --- coreapi/presence.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coreapi/presence.c b/coreapi/presence.c index ac4319df9..52724bdfc 100644 --- a/coreapi/presence.c +++ b/coreapi/presence.c @@ -1528,7 +1528,9 @@ static int write_xml_presence_service(xmlTextWriterPtr writer, LinphonePresenceS err = xmlTextWriterWriteAttribute(writer, (const xmlChar *)"priority", (const xmlChar *)"0.8"); } if (err >= 0) { - err = xmlTextWriterWriteString(writer, (const xmlChar *)contact); + const char *contact_str = service->contact; + if (contact_str == NULL) contact_str = contact; + err = xmlTextWriterWriteString(writer, (const xmlChar *)contact_str); } if (err >= 0) { /* Close the "contact" element. */