aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-10-30 09:10:24 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-10-30 09:10:24 +0900
commit3cf47c04e2de3e3f275398f4dbc223fdaeea6aff (patch)
tree3a03535bd8df114714fc78f89a44dbac4f10eedc /src
parentdaad78b8cb65dd5ef1b5e38fe8b3e78f6fb322d9 (diff)
downloadgnunet-3cf47c04e2de3e3f275398f4dbc223fdaeea6aff.tar.gz
gnunet-3cf47c04e2de3e3f275398f4dbc223fdaeea6aff.zip
-bugfixes
Diffstat (limited to 'src')
-rw-r--r--src/gnsrecord/json_gnsrecord.c3
-rwxr-xr-xsrc/identity/test_identity_messages.sh7
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"
20TEST_MSG="This is a test message. 123" 20TEST_MSG="This is a test message. 123"
21gnunet-arm -s -c test_identity.conf 21gnunet-arm -s -c test_identity.conf
22gnunet-identity -C recipientego -c test_identity.conf 22gnunet-identity -C recipientego -c test_identity.conf
23RECIPIENT_KEY=$(gnunet-identity -d -e recipientego -q -c test_identity.conf) 23RECIPIENT_KEY=`gnunet-identity -d -e recipientego -q -c test_identity.conf`
24MSG_ENC=$(gnunet-identity -W "$TEST_MSG" -k $RECIPIENT_KEY -c test_identity.conf) 24MSG_ENC=`gnunet-identity -W "$TEST_MSG" -k $RECIPIENT_KEY -c test_identity.conf`
25MSG_DEC=$(gnunet-identity -R "$MSG_ENC" -e recipientego -c test_identity.conf) 25MSG_DEC=`gnunet-identity -R "$MSG_ENC" -e recipientego -c test_identity.conf`
26gnunet-identity -D recipientego -c test_identity.conf 26gnunet-identity -D recipientego -c test_identity.conf
27gnunet-arm -e -c test_identity.conf 27gnunet-arm -e -c test_identity.conf
28if [ "$TEST_MSG" != "$MSG_DEC" ] 28if [ "$TEST_MSG" != "$MSG_DEC" ]
29then 29then
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
32fi 33fi