diff options
author | Martin Willi <martin@strongswan.org> | 2007-07-03 09:00:16 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2007-07-03 09:00:16 +0000 |
commit | 4979e85871fa9e389800dcc887a23f67776652fc (patch) | |
tree | a0095fb8697e5c45e16334f075c3a35d4b9f205c /src/charon/encoding/message.c | |
parent | cba7ba7f9dc5bb7d2b273721ed326bd503254d9c (diff) | |
download | strongswan-4979e85871fa9e389800dcc887a23f67776652fc.tar.bz2 strongswan-4979e85871fa9e389800dcc887a23f67776652fc.tar.xz |
added message ID to message log
Diffstat (limited to 'src/charon/encoding/message.c')
-rw-r--r-- | src/charon/encoding/message.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/charon/encoding/message.c b/src/charon/encoding/message.c index a32165943..980ff12b5 100644 --- a/src/charon/encoding/message.c +++ b/src/charon/encoding/message.c @@ -611,9 +611,13 @@ static char* get_string(private_message_t *this, char *buf, int len) int written; char *pos = buf; - written = snprintf(pos, len, "%N %s [", - exchange_type_names, this->exchange_type, - this->is_request ? "request" : "response"); + memset(buf, 0, len); + len--; + + written = snprintf(pos, len, "%N %s %d [", + exchange_type_names, this->exchange_type, + this->is_request ? "request" : "response", + this->message_id); if (written >= len || written < 0) { return ""; |