diff options
-rw-r--r-- | src/gnsrecord/json_gnsrecord.c | 3 | ||||
-rwxr-xr-x | src/identity/test_identity_messages.sh | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gnsrecord/json_gnsrecord.c b/src/gnsrecord/json_gnsrecord.c index 9b74f6699..1c59d146e 100644 --- a/src/gnsrecord/json_gnsrecord.c +++ b/src/gnsrecord/json_gnsrecord.c | |||
@@ -142,6 +142,9 @@ parse_record (json_t *data, struct GNUNET_GNSRECORD_Data *rd) | |||
142 | (is_rel_exp) ? "No relative expiration given" : err.text); | 142 | (is_rel_exp) ? "No relative expiration given" : err.text); |
143 | return GNUNET_SYSERR; | 143 | return GNUNET_SYSERR; |
144 | } | 144 | } |
145 | rd->expiration_time = abs_exp.abs_value_us; | ||
146 | } else { | ||
147 | rd->expiration_time = rel_exp.rel_value_us; | ||
145 | } | 148 | } |
146 | rd->record_type = GNUNET_GNSRECORD_typename_to_number (record_type); | 149 | rd->record_type = GNUNET_GNSRECORD_typename_to_number (record_type); |
147 | if (UINT32_MAX == rd->record_type) | 150 | if (UINT32_MAX == rd->record_type) |
diff --git a/src/identity/test_identity_messages.sh b/src/identity/test_identity_messages.sh index 0879061e4..d29d14acc 100755 --- a/src/identity/test_identity_messages.sh +++ b/src/identity/test_identity_messages.sh | |||
@@ -20,13 +20,14 @@ which timeout >/dev/null 2>&1 && DO_TIMEOUT="timeout 30" | |||
20 | TEST_MSG="This is a test message. 123" | 20 | TEST_MSG="This is a test message. 123" |
21 | gnunet-arm -s -c test_identity.conf | 21 | gnunet-arm -s -c test_identity.conf |
22 | gnunet-identity -C recipientego -c test_identity.conf | 22 | gnunet-identity -C recipientego -c test_identity.conf |
23 | RECIPIENT_KEY=$(gnunet-identity -d -e recipientego -q -c test_identity.conf) | 23 | RECIPIENT_KEY=`gnunet-identity -d -e recipientego -q -c test_identity.conf` |
24 | MSG_ENC=$(gnunet-identity -W "$TEST_MSG" -k $RECIPIENT_KEY -c test_identity.conf) | 24 | MSG_ENC=`gnunet-identity -W "$TEST_MSG" -k $RECIPIENT_KEY -c test_identity.conf` |
25 | MSG_DEC=$(gnunet-identity -R "$MSG_ENC" -e recipientego -c test_identity.conf) | 25 | MSG_DEC=`gnunet-identity -R "$MSG_ENC" -e recipientego -c test_identity.conf` |
26 | gnunet-identity -D recipientego -c test_identity.conf | 26 | gnunet-identity -D recipientego -c test_identity.conf |
27 | gnunet-arm -e -c test_identity.conf | 27 | gnunet-arm -e -c test_identity.conf |
28 | if [ "$TEST_MSG" != "$MSG_DEC" ] | 28 | if [ "$TEST_MSG" != "$MSG_DEC" ] |
29 | then | 29 | then |
30 | diff <(echo "$TEST_MSG" ) <(echo "$MSG_DEC") | ||
30 | echo "Failed - \"$TEST_MSG\" != \"$MSG_DEC\"" | 31 | echo "Failed - \"$TEST_MSG\" != \"$MSG_DEC\"" |
31 | exit 1 | 32 | exit 1 |
32 | fi | 33 | fi |