Fixed compiler warning
[strongswan.git] / src / libcharon / plugins / tnccs_11 / messages / tnccs_tncs_contact_info_msg.c
index 34a40c2..b8aac30 100644 (file)
@@ -24,7 +24,7 @@ typedef struct private_tnccs_tncs_contact_info_msg_t private_tnccs_tncs_contact_
  */
 struct private_tnccs_tncs_contact_info_msg_t {
        /**
-        * Public tnccs_tncs_contact_info_t interface.
+        * Public tnccs_tncs_contact_info_msg_t interface.
         */
        tnccs_tncs_contact_info_msg_t public;
 
@@ -37,11 +37,6 @@ struct private_tnccs_tncs_contact_info_msg_t {
         * XML-encoded message node
         */
        xmlNodePtr node;
-
-       /**
-        * Preferred language
-        */
-       char *preferred_language;
 };
 
 METHOD(tnccs_msg_t, get_type, tnccs_msg_type_t,
@@ -59,14 +54,14 @@ METHOD(tnccs_msg_t, get_node, xmlNodePtr,
 METHOD(tnccs_msg_t, destroy, void,
        private_tnccs_tncs_contact_info_msg_t *this)
 {
-       free(this->preferred_language);
        free(this);
 }
 
 /**
  * See header
  */
-tnccs_msg_t *tnccs_tncs_contact_info_msg_create_from_node(xmlNodePtr node)
+tnccs_msg_t *tnccs_tncs_contact_info_msg_create_from_node(xmlNodePtr node,
+                                                                                                       linked_list_t *errors)
 {
        private_tnccs_tncs_contact_info_msg_t *this;
 
@@ -88,10 +83,10 @@ tnccs_msg_t *tnccs_tncs_contact_info_msg_create_from_node(xmlNodePtr node)
 /**
  * See header
  */
-tnccs_msg_t *tnccs_tncs_contact_info_msg_create(char *language)
+tnccs_msg_t *tnccs_tncs_contact_info_msg_create(void)
 {
        private_tnccs_tncs_contact_info_msg_t *this;
-       xmlNodePtr n, n2;
+       xmlNodePtr n /*, n2 */;
 
        INIT(this,
                .public = {
@@ -103,20 +98,21 @@ tnccs_msg_t *tnccs_tncs_contact_info_msg_create(char *language)
                },
                .type = TNCCS_MSG_TNCS_CONTACT_INFO,
                .node =  xmlNewNode(NULL, BAD_CAST "TNCC-TNCS-Message"),
-               .preferred_language = strdup(language),
        );
 
-    // Add the message type number
-    n = xmlNewNode(NULL, BAD_CAST "Type");
-    xmlNodeSetContent(n, BAD_CAST "00000005");
-    xmlAddChild(this->node, n);
+       /* add the message type number in hex */
+       n = xmlNewNode(NULL, BAD_CAST "Type");
+       xmlNodeSetContent(n, BAD_CAST "00000005");
+       xmlAddChild(this->node, n);
 
-    n = xmlNewNode(NULL, BAD_CAST "XML");
-    xmlAddChild(this->node, n);
+       n = xmlNewNode(NULL, BAD_CAST "XML");
+       xmlAddChild(this->node, n);
 
-    n2 = xmlNewNode(NULL, BAD_CAST "TNCCS-TNCSContactInfo");
-    xmlNodeSetContent(n2, BAD_CAST language);
-    xmlAddChild(n, n2);
+/* TODO
+       n2 = xmlNewNode(NULL, BAD_CAST enum_to_name(tnccs_msg_type_names, this->type));
+       xmlNodeSetContent(n2, BAD_CAST language);
+       xmlAddChild(n, n2);
+*/
 
        return &this->public.tnccs_msg_interface;
 }