aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-05-25 10:19:31 +0000
committerChristian Grothoff <christian@grothoff.org>2011-05-25 10:19:31 +0000
commitacd5a863d4092349cea5ba19c1567d911ed93189 (patch)
treefd753a426aa7f0fe4db17d713ef62d6a15efa694 /src/util
parentf84694bdaec12d291af8739bfc2ec1b36e73918f (diff)
downloadgnunet-acd5a863d4092349cea5ba19c1567d911ed93189.tar.gz
gnunet-acd5a863d4092349cea5ba19c1567d911ed93189.zip
warn if this happens
Diffstat (limited to 'src/util')
-rw-r--r--src/util/client.c5
-rw-r--r--src/util/connection.c5
-rw-r--r--src/util/service.c4
3 files changed, 11 insertions, 3 deletions
diff --git a/src/util/client.c b/src/util/client.c
index 3c31aaaa8..e131d1ae9 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -891,7 +891,10 @@ GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock,
891 struct GNUNET_CLIENT_TransmitHandle *th; 891 struct GNUNET_CLIENT_TransmitHandle *th;
892 892
893 if (NULL != sock->th) 893 if (NULL != sock->th)
894 return NULL; 894 {
895 GNUNET_break (0);
896 return NULL;
897 }
895 th = GNUNET_malloc (sizeof (struct GNUNET_CLIENT_TransmitHandle)); 898 th = GNUNET_malloc (sizeof (struct GNUNET_CLIENT_TransmitHandle));
896 th->sock = sock; 899 th->sock = sock;
897 th->size = size; 900 th->size = size;
diff --git a/src/util/connection.c b/src/util/connection.c
index 7828dac53..9769c3cba 100644
--- a/src/util/connection.c
+++ b/src/util/connection.c
@@ -1630,7 +1630,10 @@ GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle
1630 notify, void *notify_cls) 1630 notify, void *notify_cls)
1631{ 1631{
1632 if (sock->nth.notify_ready != NULL) 1632 if (sock->nth.notify_ready != NULL)
1633 return NULL; 1633 {
1634 GNUNET_break (0);
1635 return NULL;
1636 }
1634 GNUNET_assert (notify != NULL); 1637 GNUNET_assert (notify != NULL);
1635 GNUNET_assert (size < GNUNET_SERVER_MAX_MESSAGE_SIZE); 1638 GNUNET_assert (size < GNUNET_SERVER_MAX_MESSAGE_SIZE);
1636 GNUNET_assert (sock->write_buffer_off <= sock->write_buffer_size); 1639 GNUNET_assert (sock->write_buffer_off <= sock->write_buffer_size);
diff --git a/src/util/service.c b/src/util/service.c
index 2338e795d..e88ac77c8 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -909,7 +909,9 @@ GNUNET_SERVICE_get_server_addresses (const char *serviceName,
909 if (strlen(unixpath) >= sizeof(s_un.sun_path)) 909 if (strlen(unixpath) >= sizeof(s_un.sun_path))
910 { 910 {
911 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 911 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
912 _("UNIXPATH `%s' too long, maximum length is %llu\n"),unixpath, sizeof(s_un.sun_path)); 912 _("UNIXPATH `%s' too long, maximum length is %llu\n"),
913 unixpath,
914 sizeof(s_un.sun_path));
913 GNUNET_free_non_null (hostname); 915 GNUNET_free_non_null (hostname);
914 GNUNET_free (unixpath); 916 GNUNET_free (unixpath);
915 return GNUNET_SYSERR; 917 return GNUNET_SYSERR;