[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30985 - in gnunet/src: gns include nat
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30985 - in gnunet/src: gns include nat |
Date: |
Sat, 30 Nov 2013 01:02:26 +0100 |
Author: grothoff
Date: 2013-11-30 01:02:26 +0100 (Sat, 30 Nov 2013)
New Revision: 30985
Modified:
gnunet/src/gns/gnunet-gns-proxy.c
gnunet/src/include/gnunet_datastore_service.h
gnunet/src/nat/Makefile.am
gnunet/src/nat/gnunet-helper-nat-client.c
gnunet/src/nat/gnunet-helper-nat-server.c
Log:
applying patch from #3148 (by shedatc) to make gnunet-helper-nat-client compile
on FreeBSD
Modified: gnunet/src/gns/gnunet-gns-proxy.c
===================================================================
--- gnunet/src/gns/gnunet-gns-proxy.c 2013-11-29 23:45:01 UTC (rev 30984)
+++ gnunet/src/gns/gnunet-gns-proxy.c 2013-11-30 00:02:26 UTC (rev 30985)
@@ -813,34 +813,28 @@
static int
check_ssl_certificate (struct Socks5Request *s5r)
{
- struct curl_tlsinfo tlsinfo;
unsigned int cert_list_size;
const gnutls_datum_t *chainp;
- union {
- struct curl_tlsinfo *tlsinfo;
- struct curl_slist *to_slist;
- } gptr;
+ const struct curl_tlsinfo *tlsinfo;
char certdn[GNUNET_DNSPARSER_MAX_NAME_LENGTH + 3];
size_t size;
gnutls_x509_crt_t x509_cert;
int rc;
const char *name;
- memset (&tlsinfo, 0, sizeof (tlsinfo));
- gptr.tlsinfo = &tlsinfo;
if (CURLE_OK !=
curl_easy_getinfo (s5r->curl,
CURLINFO_TLS_SESSION,
- &gptr))
+ &tlsinfo))
return GNUNET_SYSERR;
- if (CURLSSLBACKEND_GNUTLS != tlsinfo.ssl_backend)
+ if (CURLSSLBACKEND_GNUTLS != tlsinfo->ssl_backend)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Unsupported CURL SSL backend %d\n"),
- tlsinfo.ssl_backend);
+ tlsinfo->ssl_backend);
return GNUNET_SYSERR;
}
- chainp = gnutls_certificate_get_peers (tlsinfo.internals, &cert_list_size);
+ chainp = gnutls_certificate_get_peers (tlsinfo->internals, &cert_list_size);
if ( (! chainp) || (0 == cert_list_size) )
return GNUNET_SYSERR;
Modified: gnunet/src/include/gnunet_datastore_service.h
===================================================================
--- gnunet/src/include/gnunet_datastore_service.h 2013-11-29 23:45:01 UTC
(rev 30984)
+++ gnunet/src/include/gnunet_datastore_service.h 2013-11-30 00:02:26 UTC
(rev 30985)
@@ -83,9 +83,9 @@
* operation.
*
* @param cls closure
- * @param success GNUNET_SYSERR on failure (including timeout/queue drop)
- * GNUNET_NO if content was already there
- * GNUNET_YES (or other positive value) on success
+ * @param success #GNUNET_SYSERR on failure (including timeout/queue drop)
+ * #GNUNET_NO if content was already there
+ * #GNUNET_YES (or other positive value) on success
* @param min_expiration minimum expiration time required for 0-priority
content to be stored
* by the datacache at this time, zero for unknown, forever if
we have no
* space for 0-priority content
@@ -146,7 +146,7 @@
* (if other requests of higher priority are in the queue)
* @param timeout timeout for the operation
* @param cont continuation to call when done
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
* @return NULL if the entry was not queued, otherwise a handle that can be
used to
* cancel; note that even if NULL is returned, the callback will be
invoked
* (or rather, will already have been invoked)
@@ -180,7 +180,7 @@
* (if other requests of higher priority are in the queue)
* @param timeout how long to wait at most for a response
* @param cont continuation to call when done
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
* @return NULL if the entry was not queued, otherwise a handle that can be
used to
* cancel; note that even if NULL is returned, the callback will be
invoked
* (or rather, will already have been invoked)
@@ -206,7 +206,7 @@
* (if other requests of higher priority are in the queue)
* @param timeout how long to wait at most for a response
* @param cont continuation to call when done
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
* @return NULL if the entry was not queued, otherwise a handle that can be
used to
* cancel; note that even if NULL is returned, the callback will be
invoked
* (or rather, will already have been invoked)
@@ -223,22 +223,21 @@
/**
- * Explicitly remove some content from the database.
- * The "cont"inuation will be called with status
- * "GNUNET_OK" if content was removed, "GNUNET_NO"
- * if no matching entry was found and "GNUNET_SYSERR"
- * on all other types of errors.
+ * Explicitly remove some content from the database. @a cont will be
+ * called with status #GNUNET_OK if content was removed, #GNUNET_NO if
+ * no matching entry was found and #GNUNET_SYSERR on all other types
+ * of errors.
*
* @param h handle to the datastore
* @param key key for the value
- * @param size number of bytes in data
+ * @param size number of bytes in @a data
* @param data content stored
* @param queue_priority ranking of this request in the priority queue
* @param max_queue_size at what queue size should this request be dropped
* (if other requests of higher priority are in the queue)
* @param timeout how long to wait at most for a response
* @param cont continuation to call when done
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
* @return NULL if the entry was not queued, otherwise a handle that can be
used to
* cancel; note that even if NULL is returned, the callback will be
invoked
* (or rather, will already have been invoked)
@@ -268,13 +267,13 @@
* maybe 0 if no unique identifier is available
*/
typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls,
- const struct GNUNET_HashCode
* key,
+ const struct GNUNET_HashCode
*key,
size_t size, const void *data,
enum GNUNET_BLOCK_Type type,
uint32_t priority,
uint32_t anonymity,
- struct GNUNET_TIME_Absolute
- expiration, uint64_t uid);
+ struct GNUNET_TIME_Absolute
expiration,
+ uint64_t uid);
/**
@@ -294,7 +293,7 @@
* @param timeout how long to wait at most for a response
* @param proc function to call on a matching value;
* or with a NULL value if no datum matches
- * @param proc_cls closure for proc
+ * @param proc_cls closure for @a proc
* @return NULL if the entry was not queued, otherwise a handle that can be
used to
* cancel
*/
Modified: gnunet/src/nat/Makefile.am
===================================================================
--- gnunet/src/nat/Makefile.am 2013-11-29 23:45:01 UTC (rev 30984)
+++ gnunet/src/nat/Makefile.am 2013-11-30 00:02:26 UTC (rev 30985)
@@ -21,8 +21,16 @@
install-exec-hook:
$(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir)
$(SUDO_BINARY) || true
else
+if XFREEBSD
+ NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
+ NATSERVER = gnunet-helper-nat-server.c
+ NATCLIENT = gnunet-helper-nat-client.c
install-exec-hook:
+ $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir)
$(SUDO_BINARY) || true
endif
+else
+install-exec-hook:
+endif
bin_PROGRAMS = \
gnunet-nat-server
@@ -97,4 +105,4 @@
EXTRA_DIST = \
test_nat_data.conf \
- test_nat_test_data.conf
\ No newline at end of file
+ test_nat_test_data.conf
Modified: gnunet/src/nat/gnunet-helper-nat-client.c
===================================================================
--- gnunet/src/nat/gnunet-helper-nat-client.c 2013-11-29 23:45:01 UTC (rev
30984)
+++ gnunet/src/nat/gnunet-helper-nat-client.c 2013-11-30 00:02:26 UTC (rev
30985)
@@ -61,6 +61,11 @@
#include <netinet/ip_icmp.h>
#include <netinet/in.h>
+/* The following constant is missing from FreeBSD 9.2 */
+#ifndef ICMP_TIME_EXCEEDED
+#define ICMP_TIME_EXCEEDED 11
+#endif
+
/**
* Must match IP given in the server.
*/
Modified: gnunet/src/nat/gnunet-helper-nat-server.c
===================================================================
--- gnunet/src/nat/gnunet-helper-nat-server.c 2013-11-29 23:45:01 UTC (rev
30984)
+++ gnunet/src/nat/gnunet-helper-nat-server.c 2013-11-30 00:02:26 UTC (rev
30985)
@@ -65,6 +65,11 @@
#include <netinet/ip_icmp.h>
#include <netinet/in.h>
+/* The following constant is missing from FreeBSD 9.2 */
+#ifndef ICMP_TIME_EXCEEDED
+#define ICMP_TIME_EXCEEDED 11
+#endif
+
/**
* Should we print some debug output?
*/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30985 - in gnunet/src: gns include nat,
gnunet <=