diff options
author | t3sserakt <t3ss@posteo.de> | 2020-06-05 16:48:29 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2020-06-05 16:48:29 +0200 |
commit | 11dbdc79aeb05e82913ac70cf2ac8d4f45b02c28 (patch) | |
tree | 27626cd1ad6e5e0fd2654657b925a1be8508008d /src/cadet/gnunet-service-cadet_peer.c | |
parent | d22eacb13eb676b5c096b47c72a3fdbdb332d5a5 (diff) | |
download | gnunet-11dbdc79aeb05e82913ac70cf2ac8d4f45b02c28.tar.gz gnunet-11dbdc79aeb05e82913ac70cf2ac8d4f45b02c28.zip |
- forgot to actually add a file and some method documentations.
Diffstat (limited to 'src/cadet/gnunet-service-cadet_peer.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet_peer.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 0ff4d1fb8..55800b88c 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c | |||
@@ -1552,17 +1552,12 @@ GCP_send_ooo (struct CadetPeer *cp, | |||
1552 | env); | 1552 | env); |
1553 | } | 1553 | } |
1554 | 1554 | ||
1555 | /* | 1555 | /** |
1556 | * FIXME: comment | 1556 | * Checking if a monotime value is newer than the last monotime value received from a peer. If the time value is newer it will be stored at the peer. |
1557 | */ | 1557 | * |
1558 | void | 1558 | * @param peer The peer we received a new time value from. |
1559 | GCP_update_monotime (struct CadetPeer *peer) | 1559 | * @param monotime Time value we check against the last time value we received from a peer. |
1560 | { | 1560 | * @return GNUNET_YES if monotime is newer than the last received time value, GNUNET_NO if monotime is not newer. |
1561 | peer->last_connection_create = GNUNET_TIME_absolute_get_monotonic (cfg); | ||
1562 | } | ||
1563 | |||
1564 | /* | ||
1565 | * FIXME: comment | ||
1566 | */ | 1561 | */ |
1567 | int | 1562 | int |
1568 | GCP_check_and_update_monotime (struct CadetPeer *peer, | 1563 | GCP_check_and_update_monotime (struct CadetPeer *peer, |
@@ -1579,16 +1574,17 @@ GCP_check_and_update_monotime (struct CadetPeer *peer, | |||
1579 | return GNUNET_NO; | 1574 | return GNUNET_NO; |
1580 | } | 1575 | } |
1581 | 1576 | ||
1582 | /* | 1577 | /** |
1583 | * FIXME: documentation here | 1578 | * Checking the signature for a monotime of a GNUNET_CADET_ConnectionCreateMessage. |
1579 | * | ||
1580 | * @param peer The peer that signed the monotime value. | ||
1581 | * @param msg The GNUNET_CADET_ConnectionCreateMessage with the monotime value. | ||
1582 | * @return GNUNET_OK if the signature is good, GNUNET_SYSERR if not. | ||
1584 | */ | 1583 | */ |
1585 | int | 1584 | int |
1586 | GCP_check_monotime_sig (struct CadetPeer *peer, const struct | 1585 | GCP_check_monotime_sig (struct CadetPeer *peer, |
1587 | GNUNET_CADET_ConnectionCreateMessage *msg) | 1586 | const struct GNUNET_CADET_ConnectionCreateMessage *msg) |
1588 | { | 1587 | { |
1589 | // struct CadetPeer *peer; | ||
1590 | // const struct GNUNET_CADET_ConnectionCreateMessage *msg; | ||
1591 | |||
1592 | struct CadetConnectionCreatePS cp = { .purpose.purpose = htonl ( | 1588 | struct CadetConnectionCreatePS cp = { .purpose.purpose = htonl ( |
1593 | GNUNET_SIGNATURE_PURPOSE_CADET_CONNECTION_INITIATOR), | 1589 | GNUNET_SIGNATURE_PURPOSE_CADET_CONNECTION_INITIATOR), |
1594 | .purpose.size = htonl (sizeof(cp)), | 1590 | .purpose.size = htonl (sizeof(cp)), |