aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-11-21 17:08:45 +0100
committerChristian Grothoff <christian@grothoff.org>2022-11-21 17:08:45 +0100
commite46e53f7fbf9795a585a51777ae13fb1931dda41 (patch)
tree247915c7697e71deeefd2f05057e5c7cbb16f667
parentd237b33a42048e26f409375af65ec275ae0eb027 (diff)
parent92439915b13f5e38658fc154c20bb4d6bf2d69e3 (diff)
downloadgnunet-e46e53f7fbf9795a585a51777ae13fb1931dda41.tar.gz
gnunet-e46e53f7fbf9795a585a51777ae13fb1931dda41.zip
Merge branch 'master' of git+ssh://git.gnunet.org/gnunet
-rw-r--r--src/namestore/gnunet-namestore.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 207394dd9..8b5cf4dfd 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -455,14 +455,7 @@ parse_recordline (const char *line)
455 record.flags |= GNUNET_GNSRECORD_RF_SHADOW; 455 record.flags |= GNUNET_GNSRECORD_RF_SHADOW;
456 if (NULL != strchr (tok, (unsigned char) 'C')) 456 if (NULL != strchr (tok, (unsigned char) 'C'))
457 record.flags |= GNUNET_GNSRECORD_RF_CRITICAL; 457 record.flags |= GNUNET_GNSRECORD_RF_CRITICAL;
458 tok = strtok_r (NULL, " ", &saveptr); 458 tok += strlen (tok) + 1;
459 if (NULL == tok)
460 {
461 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
462 _ ("Empty record line argument is not allowed.\n"));
463 GNUNET_free (cp);
464 return GNUNET_SYSERR;
465 }
466 if (GNUNET_OK != GNUNET_GNSRECORD_string_to_value (record.record_type, 459 if (GNUNET_OK != GNUNET_GNSRECORD_string_to_value (record.record_type,
467 tok, 460 tok,
468 &raw_data, 461 &raw_data,
@@ -1828,7 +1821,6 @@ process_command_stdin ()
1828 return; 1821 return;
1829 } 1822 }
1830 *tmp = '\0'; 1823 *tmp = '\0';
1831 printf ("Switching to new name `%s' in zone `%s'\n", next_name, tmp + 1);
1832 have_next_zonekey = GNUNET_YES; 1824 have_next_zonekey = GNUNET_YES;
1833 /* Run a command for the previous record set */ 1825 /* Run a command for the previous record set */
1834 if (NULL != recordset) 1826 if (NULL != recordset)
@@ -1848,21 +1840,20 @@ process_command_stdin ()
1848 fprintf (stderr, "Warning, encountered recordline without zone\n"); 1840 fprintf (stderr, "Warning, encountered recordline without zone\n");
1849 continue; 1841 continue;
1850 } 1842 }
1851 printf ("Parsing `%s'\n", buf);
1852 parse_recordline (buf); 1843 parse_recordline (buf);
1853 } 1844 }
1854 if (GNUNET_NO == finished) 1845 if (GNUNET_NO == finished)
1855 { 1846 {
1856 if (GNUNET_NO == zonekey_set) 1847 if (NULL != recordset)
1857 { 1848 {
1849 if (GNUNET_YES == zonekey_set)
1850 {
1851 run_with_zone_pkey (cfg); /** one last time **/
1852 finished = GNUNET_YES;
1853 return;
1854 }
1858 fprintf (stderr, "Warning, encountered recordline without zone\n"); 1855 fprintf (stderr, "Warning, encountered recordline without zone\n");
1859 } 1856 }
1860 else if (NULL != recordset)
1861 {
1862 run_with_zone_pkey (cfg); /** one last time **/
1863 finished = GNUNET_YES;
1864 return;
1865 }
1866 } 1857 }
1867 ns_qe = GNUNET_NAMESTORE_transaction_commit (ns, &commit_cb, NULL); 1858 ns_qe = GNUNET_NAMESTORE_transaction_commit (ns, &commit_cb, NULL);
1868 return; 1859 return;