diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-05-06 18:42:45 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-05-06 18:42:45 +0200 |
commit | 1847e16524eb9fe5171612b43cf1d063d0f25dfc (patch) | |
tree | 99e4bce838d7c1588cc0133462055db3e5f72f9d /src/namestore/gnunet-namestore.c | |
parent | 3a110bca6e72f1ad21eab00b0ad64630c0bd2fa2 (diff) | |
download | gnunet-1847e16524eb9fe5171612b43cf1d063d0f25dfc.tar.gz gnunet-1847e16524eb9fe5171612b43cf1d063d0f25dfc.zip |
deprecate ill-defined set_nick API
Diffstat (limited to 'src/namestore/gnunet-namestore.c')
-rw-r--r-- | src/namestore/gnunet-namestore.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 3514f4fd9..94fcb8952 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -1038,6 +1038,24 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1038 | GNUNET_free (rd); | 1038 | GNUNET_free (rd); |
1039 | return; | 1039 | return; |
1040 | } | 1040 | } |
1041 | if (NULL != nickstring) | ||
1042 | { | ||
1043 | if (0 == strlen (nickstring)) | ||
1044 | { | ||
1045 | fprintf (stderr, _ ("Invalid nick `%s'\n"), nickstring); | ||
1046 | GNUNET_SCHEDULER_shutdown (); | ||
1047 | ret = 1; | ||
1048 | return; | ||
1049 | } | ||
1050 | add = 1; | ||
1051 | typestring = GNUNET_strdup (GNUNET_GNSRECORD_number_to_typename (GNUNET_GNSRECORD_TYPE_NICK)); | ||
1052 | name = GNUNET_strdup (GNUNET_GNS_EMPTY_LABEL_AT); | ||
1053 | value = GNUNET_strdup (nickstring); | ||
1054 | is_public = 0; | ||
1055 | expirationstring = GNUNET_strdup ("never"); | ||
1056 | GNUNET_free (nickstring); | ||
1057 | nickstring = NULL; | ||
1058 | } | ||
1041 | 1059 | ||
1042 | if (add) | 1060 | if (add) |
1043 | { | 1061 | { |
@@ -1227,21 +1245,6 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1227 | &add_continuation, | 1245 | &add_continuation, |
1228 | &add_qe_uri); | 1246 | &add_qe_uri); |
1229 | } | 1247 | } |
1230 | if (NULL != nickstring) | ||
1231 | { | ||
1232 | if (0 == strlen (nickstring)) | ||
1233 | { | ||
1234 | fprintf (stderr, _ ("Invalid nick `%s'\n"), nickstring); | ||
1235 | GNUNET_SCHEDULER_shutdown (); | ||
1236 | ret = 1; | ||
1237 | return; | ||
1238 | } | ||
1239 | add_qe_uri = GNUNET_NAMESTORE_set_nick (ns, | ||
1240 | &zone_pkey, | ||
1241 | nickstring, | ||
1242 | &add_continuation, | ||
1243 | &add_qe_uri); | ||
1244 | } | ||
1245 | if (monitor) | 1248 | if (monitor) |
1246 | { | 1249 | { |
1247 | zm = GNUNET_NAMESTORE_zone_monitor_start (cfg, | 1250 | zm = GNUNET_NAMESTORE_zone_monitor_start (cfg, |