diff --git a/commandline.c b/commandline.c index 1230ae01..2f0ab7b3 100644 --- a/commandline.c +++ b/commandline.c @@ -2614,9 +2614,9 @@ struct cli_schema command_line_options[]={ "Return identity(s) as URIs of own node, or of known routable peers, or all known peers"}, {app_id_pin, {"id", "enter", "pin", "", NULL}, 0, "Unlock any pin protected identities and enable routing packets to them"}, - {app_revoke_pin, {"id", "revoke", "pin", "", NULL}, 0, + {app_revoke_pin, {"id", "relinquish", "pin", "", NULL}, 0, "Unload any identities protected by this pin and drop all routes to them"}, - {app_revoke_pin, {"id", "revoke", "sid", "", NULL}, 0, + {app_revoke_pin, {"id", "relinquish", "sid", "", NULL}, 0, "Unload a specific identity and drop all routes to it"}, {app_route_print, {"route","print",NULL}, 0, "Print the routing table"}, diff --git a/rhizome_database.c b/rhizome_database.c index 3407aae4..cef548ab 100644 --- a/rhizome_database.c +++ b/rhizome_database.c @@ -661,7 +661,7 @@ int _sqlite_vbind(struct __sourceloc __whence, int log_level, sqlite_retry_state BIND_NULL(SID_T); } else { const char *sid_hex = alloca_tohex_sid_t(*sidp); - BIND_DEBUG(SID_T, sqlite3_bind_text, "%s,%d,SQLITE_TRANSIENT", sid_hex, SID_STRLEN); + BIND_DEBUG(SID_T, sqlite3_bind_text, "%s,%u,SQLITE_TRANSIENT", sid_hex, SID_STRLEN); BIND_RETRY(sqlite3_bind_text, sid_hex, SID_STRLEN, SQLITE_TRANSIENT); } } @@ -673,7 +673,7 @@ int _sqlite_vbind(struct __sourceloc __whence, int log_level, sqlite_retry_state BIND_NULL(RHIZOME_BID_T); } else { const char *bid_hex = alloca_tohex_rhizome_bid_t(*bidp); - BIND_DEBUG(RHIZOME_BID_T, sqlite3_bind_text, "%s,%d,SQLITE_TRANSIENT", bid_hex, RHIZOME_MANIFEST_ID_STRLEN); + BIND_DEBUG(RHIZOME_BID_T, sqlite3_bind_text, "%s,%u,SQLITE_TRANSIENT", bid_hex, RHIZOME_MANIFEST_ID_STRLEN); BIND_RETRY(sqlite3_bind_text, bid_hex, RHIZOME_MANIFEST_ID_STRLEN, SQLITE_TRANSIENT); } } @@ -686,7 +686,7 @@ int _sqlite_vbind(struct __sourceloc __whence, int log_level, sqlite_retry_state } else { char hash_hex[RHIZOME_FILEHASH_STRLEN]; tohex(hash_hex, sizeof hash_hex, hashp->binary); - BIND_DEBUG(RHIZOME_FILEHASH_T, sqlite3_bind_text, "%s,%zd,SQLITE_TRANSIENT", hash_hex, sizeof hash_hex); + BIND_DEBUG(RHIZOME_FILEHASH_T, sqlite3_bind_text, "%s,%zu,SQLITE_TRANSIENT", hash_hex, sizeof hash_hex); BIND_RETRY(sqlite3_bind_text, hash_hex, sizeof hash_hex, SQLITE_TRANSIENT); } } @@ -699,7 +699,7 @@ int _sqlite_vbind(struct __sourceloc __whence, int log_level, sqlite_retry_state BIND_NULL(TOHEX); } else { const char *hex = alloca_tohex(binary, bytes); - BIND_DEBUG(TOHEX, sqlite3_bind_text, "%s,%d,SQLITE_TRANSIENT", hex, bytes * 2); + BIND_DEBUG(TOHEX, sqlite3_bind_text, "%s,%u,SQLITE_TRANSIENT", hex, bytes * 2); BIND_RETRY(sqlite3_bind_text, hex, bytes * 2, SQLITE_TRANSIENT); } } @@ -713,7 +713,7 @@ int _sqlite_vbind(struct __sourceloc __whence, int log_level, sqlite_retry_state unsigned bytes = strlen(text); char upper[bytes + 1]; str_toupper_inplace(strcpy(upper, text)); - BIND_DEBUG(TEXT_TOUPPER, sqlite3_bind_text, "%s,%d,SQLITE_TRANSIENT", alloca_toprint(-1, upper, bytes), bytes); + BIND_DEBUG(TEXT_TOUPPER, sqlite3_bind_text, "%s,%u,SQLITE_TRANSIENT", alloca_toprint(-1, upper, bytes), bytes); BIND_RETRY(sqlite3_bind_text, upper, bytes, SQLITE_TRANSIENT); } } @@ -729,7 +729,7 @@ int _sqlite_vbind(struct __sourceloc __whence, int log_level, sqlite_retry_state unsigned i; for (i = 0; i != bytes; ++i) upper[i] = toupper(text[i]); - BIND_DEBUG(TEXT_LEN_TOUPPER, sqlite3_bind_text, "%s,%d,SQLITE_TRANSIENT", alloca_toprint(-1, upper, bytes), bytes); + BIND_DEBUG(TEXT_LEN_TOUPPER, sqlite3_bind_text, "%s,%u,SQLITE_TRANSIENT", alloca_toprint(-1, upper, bytes), bytes); BIND_RETRY(sqlite3_bind_text, upper, bytes, SQLITE_TRANSIENT); } } diff --git a/route_link.c b/route_link.c index 27625313..5fa4edec 100644 --- a/route_link.c +++ b/route_link.c @@ -1195,9 +1195,8 @@ int link_received_packet(struct decode_context *context, int sender_seq, char un // force an update when we start hearing a new neighbour link if (link->link_timeout < now){ - if (neighbour->next_neighbour_update > now + 10) { + if (neighbour->next_neighbour_update > now + 10) neighbour->next_neighbour_update = now + 10; - } } link->link_timeout = now + (context->interface->destination->tick_ms *5); diff --git a/tests/keyring b/tests/keyring index 4c93ff67..dc4ff125 100755 --- a/tests/keyring +++ b/tests/keyring @@ -235,13 +235,13 @@ test_KeyringEntryPinServer() { assertStdoutGrep --fixed-strings "$ONE" assertStdoutGrep --fixed-strings "$TWOA" assertStdoutGrep --fixed-strings "$TWOB" - executeOk_servald id revoke pin 'one' + executeOk_servald id relinquish pin 'one' executeOk_servald id self assertStdoutLineCount == 3 assertStdoutGrep --fixed-strings "$SIDA" assertStdoutGrep --fixed-strings "$TWOA" assertStdoutGrep --fixed-strings "$TWOB" - executeOk_servald id revoke sid "$TWOB" + executeOk_servald id relinquish sid "$TWOB" tfw_cat --stderr executeOk_servald id self assertStdoutLineCount == 2 diff --git a/tests/routing b/tests/routing index 0ecd82b1..8b15cbbd 100755 --- a/tests/routing +++ b/tests/routing @@ -164,7 +164,7 @@ test_unlock_ids() { executeOk_servald id enter pin 'entry-pin' wait_until has_link +B +A +A $SIDA $SIDX set_instance +A - executeOk_servald id revoke pin 'entry-pin' + executeOk_servald id relinquish pin 'entry-pin' set_instance +B wait_until --timeout=30 sid_offline $SIDX } diff --git a/version_string.sh b/version_string.sh index 066a2816..0a7cd3df 100755 --- a/version_string.sh +++ b/version_string.sh @@ -17,6 +17,11 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +if [ ! -e .git ]; then + echo "UNKNOWN-VERSION" + exit +fi + usage() { echo "Usage: ${0##*/} [options]"'