Removed len argument from proposal_get_token()
[strongswan.git] / src / conftest / hooks / log_id.c
index 66a864e..07dd6a4 100644 (file)
@@ -32,13 +32,14 @@ struct private_log_id_t {
 
 METHOD(listener_t, message, bool,
        private_log_id_t *this, ike_sa_t *ike_sa, message_t *message,
-       bool incoming)
+       bool incoming, bool plain)
 {
-       if (incoming)
+       if (incoming && plain)
        {
                enumerator_t *enumerator;
                payload_t *payload;
-               id_payload_t *id;
+               id_payload_t *id_payload;
+               identification_t *id;
                chunk_t data;
 
                enumerator = message->create_payload_enumerator(message);
@@ -47,12 +48,14 @@ METHOD(listener_t, message, bool,
                        if (payload->get_type(payload) == ID_INITIATOR ||
                                payload->get_type(payload) == ID_RESPONDER)
                        {
-                               id = (id_payload_t*)payload;
-                               data = id->get_data(id);
+                               id_payload = (id_payload_t*)payload;
+                               id = id_payload->get_identification(id_payload);
+                               data = id->get_encoding(id);
 
                                DBG1(DBG_CFG, "%N: %N %B",
                                         payload_type_short_names, payload->get_type(payload),
-                                        id_type_names, id->get_id_type(id), &data);
+                                        id_type_names, id->get_type(id), &data);
+                               id->destroy(id);
                        }
                }
                enumerator->destroy(enumerator);