[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31616 - in gnunet/src: regex tun
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31616 - in gnunet/src: regex tun |
Date: |
Fri, 20 Dec 2013 15:23:53 +0100 |
Author: grothoff
Date: 2013-12-20 15:23:53 +0100 (Fri, 20 Dec 2013)
New Revision: 31616
Modified:
gnunet/src/regex/regex_api.c
gnunet/src/tun/regex.c
Log:
-give nicer warning about big regex
Modified: gnunet/src/regex/regex_api.c
===================================================================
--- gnunet/src/regex/regex_api.c 2013-12-20 14:23:02 UTC (rev 31615)
+++ gnunet/src/regex/regex_api.c 2013-12-20 14:23:53 UTC (rev 31616)
@@ -105,7 +105,7 @@
/**
* Announce the given peer under the given regular expression. Does
- * not free resources, must call GNUNET_REGEX_announce_cancel for
+ * not free resources, must call #GNUNET_REGEX_announce_cancel for
* that.
*
* @param cfg configuration to use
@@ -113,7 +113,7 @@
* @param refresh_delay after what delay should the announcement be repeated?
* @param compression How many characters per edge can we squeeze?
* @return Handle to reuse o free cached resources.
- * Must be freed by calling GNUNET_REGEX_announce_cancel.
+ * Must be freed by calling #GNUNET_REGEX_announce_cancel.
*/
struct GNUNET_REGEX_Announcement *
GNUNET_REGEX_announce (const struct GNUNET_CONFIGURATION_Handle *cfg,
@@ -127,6 +127,9 @@
slen = strlen (regex) + 1;
if (slen + sizeof (struct AnnounceMessage) >= GNUNET_SERVER_MAX_MESSAGE_SIZE)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ _("Regex `%s' is too long!\n"),
+ regex);
GNUNET_break (0);
return NULL;
}
@@ -269,7 +272,7 @@
s->callback (s->callback_cls,
pid,
&pid[1], gpl,
- &pid[1 + gpl], ppl);
+ &pid[1 + gpl], ppl);
return;
}
}
Modified: gnunet/src/tun/regex.c
===================================================================
--- gnunet/src/tun/regex.c 2013-12-20 14:23:02 UTC (rev 31615)
+++ gnunet/src/tun/regex.c 2013-12-20 14:23:53 UTC (rev 31616)
@@ -410,7 +410,7 @@
* Convert an exit policy to a regular expression. The exit policy
* specifies a set of subnets this peer is willing to serve as an
* exit for; the resulting regular expression will match the
- * IPv6 address strings as returned by 'GNUNET_TUN_ipv6toregexsearch'.
+ * IPv6 address strings as returned by #GNUNET_TUN_ipv6toregexsearch().
*
* @param policy exit policy specification
* @return regular expression, NULL on error
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31616 - in gnunet/src: regex tun,
gnunet <=