handle zero size Base64 conversions
[strongswan.git] / src / libcharon / plugins / tnccs_11 / messages / tnccs_preferred_language_msg.c
index d76159b..fd85350 100644 (file)
@@ -73,9 +73,11 @@ METHOD(tnccs_preferred_language_msg_t, get_preferred_language, char*,
 /**
  * See header
  */
-tnccs_msg_t *tnccs_preferred_language_msg_create_from_node(xmlNodePtr node)
+tnccs_msg_t *tnccs_preferred_language_msg_create_from_node(xmlNodePtr node,
+                                                                                                       linked_list_t *errors)
 {
        private_tnccs_preferred_language_msg_t *this;
+       xmlChar *language;
 
        INIT(this,
                .public = {
@@ -90,6 +92,10 @@ tnccs_msg_t *tnccs_preferred_language_msg_create_from_node(xmlNodePtr node)
                .node = node,
        );
 
+       language = xmlNodeGetContent(node);
+       this->preferred_language = strdup((char*)language);
+       xmlFree(language);
+
        return &this->public.tnccs_msg_interface;
 }