diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-03-25 14:14:56 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-03-25 14:14:56 -0400 |
commit | 61cebb2035b8cfb2f84ab5e198742d0b29b41192 (patch) | |
tree | 209dd7c275e6005480be3833ea3d2302c794cd80 /src/feature/control/control_fmt.c | |
parent | 2917ecaa970c8fabcc0e9875b1e87c0d279ab1b3 (diff) | |
download | tor-61cebb2035b8cfb2f84ab5e198742d0b29b41192.tar.gz tor-61cebb2035b8cfb2f84ab5e198742d0b29b41192.zip |
Minimize the includes in control.c
Diffstat (limited to 'src/feature/control/control_fmt.c')
-rw-r--r-- | src/feature/control/control_fmt.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/feature/control/control_fmt.c b/src/feature/control/control_fmt.c index 290ea61450..71f9d82163 100644 --- a/src/feature/control/control_fmt.c +++ b/src/feature/control/control_fmt.c @@ -392,3 +392,18 @@ decode_escaped_string(const char *start, size_t in_len_max, return end+1; } + +/** Return a longname the node whose identity is <b>id_digest</b>. If + * node_get_by_id() returns NULL, base 16 encoding of <b>id_digest</b> is + * returned instead. + * + * This function is not thread-safe. Each call to this function invalidates + * previous values returned by this function. + */ +MOCK_IMPL(const char *, +node_describe_longname_by_id,(const char *id_digest)) +{ + static char longname[MAX_VERBOSE_NICKNAME_LEN+1]; + node_get_verbose_nickname_by_id(id_digest, longname); + return longname; +} |