summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b57d6e2)
raw | patch | inline | side by side (parent: b57d6e2)
author | Florian Forster <octo@collectd.org> | |
Tue, 21 Apr 2015 08:00:23 +0000 (10:00 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 19 May 2015 07:49:20 +0000 (09:49 +0200) |
src/libcollectdclient/network.c | patch | blob | history | |
src/libcollectdclient/network_buffer.c | patch | blob | history |
index ddb3b5b9b35c03b5aa93a74eb6fab8347b562b98..c390a1ce7cada8de9b029cb5d088de05ad0c8c3e 100644 (file)
/**
* collectd - src/libcollectdclient/network.c
- * Copyright (C) 2005-2013 Florian Forster
+ * Copyright (C) 2005-2015 Florian Forster
* Copyright (C) 2010 Max Henkel
*
* Permission is hereby granted, free of charge, to any person obtaining a
memset (buffer, 0, sizeof (buffer));
buffer_size = sizeof (buffer);
- lcc_network_buffer_finalize (srv->buffer);
+ status = lcc_network_buffer_finalize (srv->buffer);
+ if (status != 0)
+ {
+ lcc_network_buffer_initialize (srv->buffer);
+ return (status);
+ }
+
status = lcc_network_buffer_get (srv->buffer, buffer, &buffer_size);
lcc_network_buffer_initialize (srv->buffer);
index 61c7c22e2d7ab963a2d98977f8c0c3747ad18723..343c285ad9ec35e95fcdcce23420d84b05a959de 100644 (file)
/**
* collectd - src/libcollectdclient/network_buffer.c
- * Copyright (C) 2010-2012 Florian octo Forster
+ * Copyright (C) 2010-2015 Florian octo Forster
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
#if HAVE_LIBGCRYPT
if (nb->seclevel == SIGN)
- nb_add_signature (nb);
+ return nb_add_signature (nb);
else if (nb->seclevel == ENCRYPT)
- nb_add_encryption (nb);
+ return nb_add_encryption (nb);
#endif
return (0);