[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31145 - gnunet/src/namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31145 - gnunet/src/namestore |
Date: |
Fri, 6 Dec 2013 15:33:00 +0100 |
Author: wachs
Date: 2013-12-06 15:33:00 +0100 (Fri, 06 Dec 2013)
New Revision: 31145
Modified:
gnunet/src/namestore/gnunet-namestore.c
Log:
fixed uri parsing and exit codes
Modified: gnunet/src/namestore/gnunet-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-namestore.c 2013-12-06 14:08:09 UTC (rev
31144)
+++ gnunet/src/namestore/gnunet-namestore.c 2013-12-06 14:33:00 UTC (rev
31145)
@@ -306,6 +306,7 @@
if (GNUNET_NO != success)
ret = 1;
}
+ ret = 0;
test_finished ();
}
@@ -704,12 +705,8 @@
char sname[64];
struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
- if ( (2 != (sscanf (uri,
- "gnunet://gns/%104s/%63s",
- sh,
- sname)) ) ||
- (GNUNET_OK !=
- GNUNET_CRYPTO_ecdsa_public_key_from_string (sh, strlen (sh), &pkey))
)
+ if ( (2 != (sscanf (uri, "gnunet://gns/%52s/%63s", sh, sname)) ) ||
+ (GNUNET_OK != GNUNET_CRYPTO_ecdsa_public_key_from_string (sh, strlen
(sh), &pkey)) )
{
fprintf (stderr,
_("Invalid URI `%s'\n"),
@@ -732,7 +729,7 @@
else
rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
- if (1 != shadow)
+ if (1 == shadow)
rd.flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD;
add_qe_uri = GNUNET_NAMESTORE_records_store (ns,
&zone_pkey,
@@ -791,6 +788,7 @@
ego_name);
}
GNUNET_SCHEDULER_shutdown ();
+ ret = -1;
return;
}
zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
@@ -815,6 +813,7 @@
fprintf (stderr,
_("No default ego configured in identity service\n"));
GNUNET_SCHEDULER_shutdown ();
+ ret = -1;
return;
}
else
@@ -847,6 +846,7 @@
fprintf (stderr,
_("Identity service is not running\n"));
GNUNET_SCHEDULER_shutdown ();
+ ret = -1;
return;
}
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
@@ -857,6 +857,7 @@
idh = GNUNET_IDENTITY_connect (cfg, &id_connect_cb, (void *) cfg);
if (NULL == idh)
fprintf (stderr, _("Cannot connect to identity service\n"));
+ ret = -1;
return;
}
el = GNUNET_IDENTITY_ego_lookup (cfg,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31145 - gnunet/src/namestore,
gnunet <=