add a way to know who send data in read data callback
diff --git a/dtls.c b/dtls.c
index fc7016a..d7e5443 100644
--- a/dtls.c
+++ b/dtls.c
@@ -3891,7 +3891,7 @@
return -1;
}
dtls_stop_retransmission(ctx, peer);
- CALL(ctx, read, &peer->session, data, data_length);
+ CALL(ctx, read, &peer->session, &peer->handshake_params, data, data_length);
break;
default:
dtls_info("dropped unknown message of type %d\n",msg[0]);
diff --git a/dtls.h b/dtls.h
index 934eae8..59d67bb 100644
--- a/dtls.h
+++ b/dtls.h
@@ -102,7 +102,7 @@
* @return ignored
*/
int (*read)(struct dtls_context_t *ctx,
- session_t *session, uint8 *buf, size_t len);
+ session_t *session, dtls_handshake_parameters_t * identity, uint8 *buf, size_t len);
/**
* The event handler is called when a message from the alert