summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am7
-rw-r--r--README2
-rw-r--r--configure.ac17
-rw-r--r--contrib/packages/guix/gnunet-doc.scm52
-rw-r--r--contrib/packages/guix/gnunet.scm165
-rw-r--r--contrib/packages/guix/guix-env.scm2
-rw-r--r--contrib/packages/guix/packages/gnunet/packages/gnunet.scm47
-rw-r--r--contrib/packages/guix/packages/gnunet/packages/texlive.scm182
-rw-r--r--doc/.gitignore11
-rw-r--r--doc/Makefile.am177
-rw-r--r--doc/README.txt2
-rw-r--r--doc/chapters/developer.texi5
-rw-r--r--doc/chapters/installation.texi2
-rw-r--r--doc/gnunet-c-tutorial.texi129
-rw-r--r--doc/images/structure.dot (renamed from doc/structure.dot)0
-rw-r--r--doc/man/gnunet-identity.12
-rw-r--r--src/datastore/plugin_datastore_sqlite.c29
-rw-r--r--src/fs/plugin_block_fs.c17
-rw-r--r--src/include/gnunet_set_service.h5
-rw-r--r--src/multicast/.gitignore2
-rw-r--r--src/peerinfo/peerinfo_api.c5
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c8
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct_alice.c8
-rw-r--r--src/set/gnunet-service-set.c39
-rw-r--r--src/set/test_set_intersection_result_full.c2
-rw-r--r--src/set/test_set_union_result_symmetric.c2
-rw-r--r--src/social/test_social.c166
-rw-r--r--src/transport/tcp_server_legacy.c20
-rw-r--r--src/util/.gitignore1
-rw-r--r--src/util/network.c16
-rw-r--r--src/util/scheduler.c14
31 files changed, 915 insertions, 221 deletions
diff --git a/Makefile.am b/Makefile.am
index 567e7b5ff..0466fcc10 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,11 @@
1# This Makefile.am is in the public domain 1# This Makefile.am is in the public domain
2AM_CPPFLAGS = -I$(top_srcdir)/src/include 2AM_CPPFLAGS = -I$(top_srcdir)/src/include
3SUBDIRS = doc m4 src po pkgconfig 3
4if DOC_ONLY
5 SUBDIRS = doc m4 po pkgconfig
6else
7 SUBDIRS = doc m4 src po pkgconfig
8endif
4 9
5if !TALER_ONLY 10if !TALER_ONLY
6 SUBDIRS += contrib 11 SUBDIRS += contrib
diff --git a/README b/README
index 0e85fadfd..30ebf5f4f 100644
--- a/README
+++ b/README
@@ -48,7 +48,7 @@ These are the direct dependencies for running GNUnet:
48- libogg >= 1.3.0 (optional for experimental conversation tool) 48- libogg >= 1.3.0 (optional for experimental conversation tool)
49- python-zbar >= 0.10 (optional for gnunet-qr) 49- python-zbar >= 0.10 (optional for gnunet-qr)
50- TeX Live >= 2012 (optional for gnunet-bcd) 50- TeX Live >= 2012 (optional for gnunet-bcd)
51- Texinfo Tested with version 6.3 51- Texinfo >= 5.2
52- libglpk >= 4.45 (optional for experimental code) 52- libglpk >= 4.45 (optional for experimental code)
53 53
54Recommended autotools for compiling the SVN version are: 54Recommended autotools for compiling the SVN version are:
diff --git a/configure.ac b/configure.ac
index 027724774..206a407fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -586,6 +586,23 @@ AC_CHECK_LIB([kvm],[kvm_open])
586AC_CHECK_LIB([kstat],[kstat_open]) 586AC_CHECK_LIB([kstat],[kstat_open])
587 587
588 588
589# should the build process be restricted to only building
590# the documentation?
591AC_MSG_CHECKING(whether to build documentation ONLY)
592AC_ARG_ENABLE([documentation],
593 [AS_HELP_STRING([--enable-documentation], [only build the documentation])],
594 [doc_only=${enableval}],
595 [doc_only=no])
596AC_MSG_RESULT($doc_only)
597if test "x$doc_only" = "xyes"
598then
599 AM_CONDITIONAL([DOC_ONLY],true)
600 AC_DEFINE([DOC_ONLY],[1],[Building the documentation])
601else
602 AM_CONDITIONAL([DOC_ONLY],false)
603 AC_DEFINE([DOC_ONLY],[0],[Canonical compilation])
604fi
605
589# should the build process be restricted to the code required 606# should the build process be restricted to the code required
590# for GNU Taler wallets? 607# for GNU Taler wallets?
591AC_MSG_CHECKING(whether to compile GNU Taler Wallet library ONLY) 608AC_MSG_CHECKING(whether to compile GNU Taler Wallet library ONLY)
diff --git a/contrib/packages/guix/gnunet-doc.scm b/contrib/packages/guix/gnunet-doc.scm
index a2a9a2393..9974c1b51 100644
--- a/contrib/packages/guix/gnunet-doc.scm
+++ b/contrib/packages/guix/gnunet-doc.scm
@@ -46,6 +46,7 @@
46 (gnu packages gstreamer) 46 (gnu packages gstreamer)
47 (gnu packages gtk) 47 (gnu packages gtk)
48 (gnu packages guile) 48 (gnu packages guile)
49 (gnu packages graphviz)
49 (gnu packages image) 50 (gnu packages image)
50 (gnu packages image-viewers) 51 (gnu packages image-viewers)
51 (gnu packages libidn) 52 (gnu packages libidn)
@@ -64,13 +65,14 @@
64 (gnu packages video) 65 (gnu packages video)
65 (gnu packages web) 66 (gnu packages web)
66 (gnu packages xiph) 67 (gnu packages xiph)
68 ;;(gnunet packages texlive) ;GNUnet module including texlive-2012 WIP
67 ((guix licenses) #:prefix license:)) 69 ((guix licenses) #:prefix license:))
68 70
69(define %source-dir (string-append (current-source-directory) 71(define %source-dir (string-append (current-source-directory)
70 "/../../../")) 72 "/../../../"))
71 73
72(define gnunet-doc 74(define gnunet-doc
73 (let* ((revision "1") 75 (let* ((revision "2")
74 (select? (delay (or (git-predicate 76 (select? (delay (or (git-predicate
75 (string-append (current-source-directory) 77 (string-append (current-source-directory)
76 "/../../../")) 78 "/../../../"))
@@ -115,17 +117,20 @@
115 ("bluez" ,bluez) ; for optional bluetooth feature 117 ("bluez" ,bluez) ; for optional bluetooth feature
116 ("glib" ,glib) 118 ("glib" ,glib)
117 ;;("texlive-minimal" ,texlive-minimal) ; optional. 119 ;;("texlive-minimal" ,texlive-minimal) ; optional.
118 ("texlive" ,texlive) 120 ("texlive" ,texlive) ;TODO: Stabilize Texlive-2012 package
119 ("libogg" ,libogg))) 121 ("libogg" ,libogg)))
120 (native-inputs 122 (native-inputs
121 `(("pkg-config" ,pkg-config) 123 `(("pkg-config" ,pkg-config)
122 ("autoconf" ,autoconf) 124 ("autoconf" ,autoconf)
123 ("automake" ,automake) 125 ("automake" ,automake)
124 ("gnu-gettext" ,gnu-gettext) 126 ("gnu-gettext" ,gnu-gettext)
125 ("texinfo" ,texinfo) 127 ("graphviz" ,graphviz) ; dot
128 ("texinfo-5" ,texinfo-5) ; Debian stable
126 ("libtool" ,libtool))) 129 ("libtool" ,libtool)))
127 (arguments 130 (arguments
128 `(#:tests? #f ;Don't run tests 131 `(#:configure-flags
132 (list "--enable-documentation")
133 #:tests? #f ;Don't run tests
129 #:phases 134 #:phases
130 (modify-phases %standard-phases 135 (modify-phases %standard-phases
131 (add-after 'unpack 'autoconf 136 (add-after 'unpack 'autoconf
@@ -140,22 +145,29 @@
140 (chdir "doc") 145 (chdir "doc")
141 (zero? (system* "make" "doc-all-give-me-the-noise")))) 146 (zero? (system* "make" "doc-all-give-me-the-noise"))))
142 (replace 'install 147 (replace 'install
143 (lambda* (#:key outputs #:allow-other-keys) 148 (lambda _
144 (let* ((out (assoc-ref outputs "out")) 149 (zero? (system* "make" "doc-all-install")))))))
145 (doc (string-append out "/share/doc/gnunet"))) 150 ;;(lambda* (#:key outputs #:allow-other-keys)
146 (mkdir-p doc) 151 ;; (let* ((out (assoc-ref outputs "out"))
147 (mkdir-p (string-append doc "/gnunet")) 152 ;; (doc (string-append out "/share/doc/gnunet")))
148 (install-file "gnunet.pdf" doc) 153 ;; (mkdir-p doc)
149 (install-file "gnunet.info" doc) 154 ;; (copy-recursively "images"
150 (copy-recursively "gnunet" 155 ;; (string-append doc
151 (string-append doc 156 ;; "/images"))
152 "/gnunet")) 157 ;; (mkdir-p (string-append doc "/gnunet"))
153 (install-file "gnunet-c-tutorial.pdf" doc) 158 ;; (install-file "gnunet.pdf" doc)
154 (install-file "gnunet-c-tutorial.info" doc) 159 ;; (install-file "gnunet.info" doc)
155 (copy-recursively "gnunet-c-tutorial" 160 ;; (install-file "gnunet.log" doc) ;TODO: Move to 'dev' output?
156 (string-append doc 161 ;; (copy-recursively "gnunet"
157 "/gnunet-c-tutorial"))) 162 ;; (string-append doc
158 #t))))) 163 ;; "/gnunet"))
164 ;; (install-file "gnunet-c-tutorial.pdf" doc)
165 ;; (install-file "gnunet-c-tutorial.info" doc)
166 ;; (install-file "gnunet-c-tutorial.log" doc) ;TODO: Move to 'dev' output?
167 ;; (copy-recursively "gnunet-c-tutorial"
168 ;; (string-append doc
169 ;; "/gnunet-c-tutorial")))
170 ;; #t)))))
159 (synopsis "Documentation of GNUnet") 171 (synopsis "Documentation of GNUnet")
160 (description 172 (description
161 "GNUnet documentation build") 173 "GNUnet documentation build")
diff --git a/contrib/packages/guix/gnunet.scm b/contrib/packages/guix/gnunet.scm
new file mode 100644
index 000000000..a358fcecc
--- /dev/null
+++ b/contrib/packages/guix/gnunet.scm
@@ -0,0 +1,165 @@
1;;; This file is part of GNUnet.
2;;; Copyright (C) 2016, 2017 GNUnet e.V.
3;;;
4;;; GNUnet is free software; you can redistribute it and/or modify
5;;; it under the terms of the GNU General Public License as published
6;;; by the Free Software Foundation; either version 3, or (at your
7;;; option) any later version.
8;;;
9;;; GNUnet is distributed in the hope that it will be useful, but
10;;; WITHOUT ANY WARRANTY; without even the implied warranty of
11;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12;;; General Public License for more details.
13;;;
14;;; You should have received a copy of the GNU General Public License
15;;; along with GNUnet; see the file COPYING. If not, write to the
16;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17;;; Boston, MA 02110-1301, USA.
18
19(use-modules
20 (ice-9 popen)
21 (ice-9 match)
22 (ice-9 rdelim)
23 (guix packages)
24 (guix build-system gnu)
25 (guix gexp)
26 ((guix build utils) #:select (with-directory-excursion))
27 (guix git-download)
28 (guix utils) ; current-source-directory
29 (gnu packages)
30 (gnu packages aidc)
31 (gnu packages autotools)
32 (gnu packages backup)
33 (gnu packages base)
34 (gnu packages compression)
35 (gnu packages curl)
36 (gnu packages databases)
37 (gnu packages file)
38 (gnu packages gettext)
39 (gnu packages glib)
40 (gnu packages gnome)
41 (gnu packages gnunet)
42 (gnu packages gnupg)
43 (gnu packages gnuzilla)
44 (gnu packages groff)
45 (gnu packages gstreamer)
46 (gnu packages gtk)
47 (gnu packages guile)
48 (gnu packages image)
49 (gnu packages image-viewers)
50 (gnu packages libidn)
51 (gnu packages libunistring)
52 (gnu packages linux)
53 (gnu packages maths)
54 (gnu packages multiprecision)
55 (gnu packages perl)
56 (gnu packages pkg-config)
57 (gnu packages pulseaudio)
58 (gnu packages python)
59 (gnu packages tex)
60 (gnu packages texinfo)
61 (gnu packages tex)
62 (gnu packages tls)
63 (gnu packages video)
64 (gnu packages web)
65 (gnu packages xiph)
66 ((guix licenses) #:prefix license:))
67
68(define %source-dir (string-append (current-source-directory)
69 "/../../../"))
70
71(define gnunet-test-git
72 (let* ((revision "1")
73 (select? (delay (or (git-predicate
74 (string-append (current-source-directory)
75 "/../../../"))
76 source-file?))))
77 (package
78 (name "gnunet-test-git")
79 (version (string-append "0.10.1-" revision "." "dev"))
80 (source
81 (local-file ;;"../../.."
82 ;;%source-dir
83 ;;(string-append (getcwd) "/../../../")
84 (string-append (getcwd)) ;drrty hack and this assumes one static position FIXME!
85 #:recursive? #t))
86 ;;#:select? (git-predicate %source-dir)))
87 ;;#:select? (force select?)))
88 (build-system gnu-build-system)
89 (inputs
90 `(("glpk" ,glpk)
91 ("gnurl" ,gnurl)
92 ("gstreamer" ,gstreamer)
93 ("gst-plugins-base" ,gst-plugins-base)
94 ("gnutls" ,gnutls) ;Change to gnutls/dane once it is merged.
95 ("libextractor" ,libextractor)
96 ("libgcrypt" ,libgcrypt)
97 ("libidn" ,libidn)
98 ("libmicrohttpd" ,libmicrohttpd)
99 ("libltdl" ,libltdl)
100 ("libunistring" ,libunistring)
101 ("openssl" ,openssl)
102 ("opus" ,opus)
103 ("pulseaudio" ,pulseaudio)
104 ("sqlite" ,sqlite)
105 ("postgresql" ,postgresql)
106 ("mysql" ,mysql)
107 ("zlib" ,zlib)
108 ("perl" ,perl)
109 ("python" ,python) ; tests and gnunet-qr
110 ("jansson" ,jansson)
111 ("nss" ,nss)
112 ("glib" ,glib "bin")
113 ("gmp" ,gmp)
114 ("bluez" ,bluez) ; for optional bluetooth feature
115 ("glib" ,glib)
116 ;; There are currently no binary substitutes for texlive on
117 ;; hydra.gnu.org or its mirrors due to its size. Uncomment if you need it.
118 ;;("texlive-minimal" ,texlive-minimal) ; optional.
119 ("texlive" ,texlive)
120 ("libogg" ,libogg)))
121 (native-inputs
122 `(("pkg-config" ,pkg-config)
123 ("autoconf" ,autoconf)
124 ("automake" ,automake)
125 ("gnu-gettext" ,gnu-gettext)
126 ("texinfo" ,texinfo-5) ; Debian stable: 5.2
127 ("libtool" ,libtool)))
128 (outputs '("out" "debug"))
129 (arguments
130 `(#:configure-flags
131 (list (string-append "--with-nssdir=" %output "/lib")
132 "--enable-gcc-hardening"
133 "--enable-linker-hardening"
134 "--enable-logging=verbose"
135 "CFLAGS=-ggdb -O0")
136 #:phases
137 ;; swap check and install phases and set paths to installed bin
138 (modify-phases %standard-phases
139 (add-after 'unpack 'patch-bin-sh
140 (lambda _
141 (substitute* "bootstrap"
142 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
143 (for-each (lambda (f) (chmod f #o755))
144 (find-files "po" ""))
145 #t))
146 (add-after 'patch-bin-sh 'bootstrap
147 (lambda _
148 (zero? (system* "sh" "bootstrap"))))
149 (delete 'check)
150 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
151 (add-after 'install 'set-path-for-check
152 (lambda* (#:key outputs #:allow-other-keys)
153 (let* ((out (assoc-ref outputs "out"))
154 (bin (string-append out "/bin"))
155 (lib (string-append out "/lib")))
156 (setenv "GNUNET_PREFIX" lib)
157 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
158 (zero? (system* "make" "check"))))))))
159 (synopsis "tests enabled without experimental")
160 (description
161 "GNUnet from git HEAD")
162 (license license:gpl3+)
163 (home-page "https://gnunet.org"))))
164
165gnunet-test-git
diff --git a/contrib/packages/guix/guix-env.scm b/contrib/packages/guix/guix-env.scm
index 6946fee57..c62a713a2 100644
--- a/contrib/packages/guix/guix-env.scm
+++ b/contrib/packages/guix/guix-env.scm
@@ -146,7 +146,7 @@
146 ("autoconf" ,autoconf) 146 ("autoconf" ,autoconf)
147 ("automake" ,automake) 147 ("automake" ,automake)
148 ("gnu-gettext" ,gnu-gettext) 148 ("gnu-gettext" ,gnu-gettext)
149 ("texinfo" ,texinfo) 149 ("texinfo" ,texinfo-5) ; Debian stable: 5.2
150 ("libtool" ,libtool))) 150 ("libtool" ,libtool)))
151 ;; TODO: To make use of out:debug, which carries the symbols, 151 ;; TODO: To make use of out:debug, which carries the symbols,
152 ;; this file needs to fixed. 152 ;; this file needs to fixed.
diff --git a/contrib/packages/guix/packages/gnunet/packages/gnunet.scm b/contrib/packages/guix/packages/gnunet/packages/gnunet.scm
index 7840705a6..fbc132d78 100644
--- a/contrib/packages/guix/packages/gnunet/packages/gnunet.scm
+++ b/contrib/packages/guix/packages/gnunet/packages/gnunet.scm
@@ -61,8 +61,8 @@
61;; Explanation for name scheme: UNIXPATH is capped at 108 characters, 61;; Explanation for name scheme: UNIXPATH is capped at 108 characters,
62;; this causes lots of tests to fail. 62;; this causes lots of tests to fail.
63(define-public gnunetg 63(define-public gnunetg
64 (let* ((commit "b005d5e4dac03fcfdabf0d0de434da3b295f6d63") 64 (let* ((commit "3c3090717610ea787fdd3562901329254a6af0d6")
65 (revision "30")) 65 (revision "32"))
66 (package 66 (package
67 (inherit gnunet) 67 (inherit gnunet)
68 (name "gnunetg") 68 (name "gnunetg")
@@ -77,7 +77,7 @@
77 (file-name (string-append name "-" version "-checkout")) 77 (file-name (string-append name "-" version "-checkout"))
78 (sha256 78 (sha256
79 (base32 79 (base32
80 "10wfb58pi55399cw100vplq3f8nxg2vl6sywcmvkx3wg1d3firla")))) 80 "0g0x1r833jkssfd2sndy37509dqf9f8myjvg7mnadwc1irp393bl"))))
81 (build-system gnu-build-system) 81 (build-system gnu-build-system)
82 (inputs 82 (inputs
83 `(("glpk" ,glpk) 83 `(("glpk" ,glpk)
@@ -333,6 +333,47 @@
333 (zero? (system* "make" "check")))))))) 333 (zero? (system* "make" "check"))))))))
334 (synopsis "gnunet, full git with tests enabled with parallel tests"))) 334 (synopsis "gnunet, full git with tests enabled with parallel tests")))
335 335
336(define-public gnunetg-test
337 (package
338 (inherit gnunetg)
339 (name "gnunetg-test")
340 (arguments
341 `(#:configure-flags
342 (list (string-append "--with-nssdir=" %output "/lib")
343 "--enable-gcc-hardening"
344 "--enable-linker-hardening"
345
346 ;;"--enable-poisoning"
347 ;;"--enable-sanitizer"
348 "--enable-logging=verbose"
349 "CFLAGS=-ggdb -O0")
350 ;; #:parallel-tests? #f ; parallel building seems to fail
351 ;;#:tests? #f ; fail: test_gnunet_statistics.py
352 #:phases
353 ;; swap check and install phases and set paths to installed bin
354 (modify-phases %standard-phases
355 (add-after 'unpack 'patch-bin-sh
356 (lambda _
357 (substitute* "bootstrap"
358 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
359 (for-each (lambda (f) (chmod f #o755))
360 (find-files "po" ""))
361 #t))
362 (add-after 'patch-bin-sh 'bootstrap
363 (lambda _
364 (zero? (system* "sh" "bootstrap"))))
365 (delete 'check)
366 ;; XXX: https://gnunet.org/bugs/view.php?id=4619
367 (add-after 'install 'set-path-for-check
368 (lambda* (#:key outputs #:allow-other-keys)
369 (let* ((out (assoc-ref outputs "out"))
370 (bin (string-append out "/bin"))
371 (lib (string-append out "/lib")))
372 (setenv "GNUNET_PREFIX" lib)
373 (setenv "PATH" (string-append (getenv "PATH") ":" bin))
374 (zero? (system* "make" "check"))))))))
375 (synopsis "gnunet, full git with tests enabled without experimental")))
376
336;; ... and one package to test the package with "parallel-tests? #f" 377;; ... and one package to test the package with "parallel-tests? #f"
337(define-public gnunetgftn 378(define-public gnunetgftn
338 (package 379 (package
diff --git a/contrib/packages/guix/packages/gnunet/packages/texlive.scm b/contrib/packages/guix/packages/gnunet/packages/texlive.scm
new file mode 100644
index 000000000..77256a947
--- /dev/null
+++ b/contrib/packages/guix/packages/gnunet/packages/texlive.scm
@@ -0,0 +1,182 @@
1;;; This file is part of GNUnet.
2;;; Copyright (C) 2017 GNUnet e.V.
3;;;
4;;; GNUnet is free software; you can redistribute it and/or modify
5;;; it under the terms of the GNU General Public License as published
6;;; by the Free Software Foundation; either version 3, or (at your
7;;; option) any later version.
8;;;
9;;; GNUnet is distributed in the hope that it will be useful, but
10;;; WITHOUT ANY WARRANTY; without even the implied warranty of
11;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12;;; General Public License for more details.
13;;;
14;;; You should have received a copy of the GNU General Public License
15;;; along with GNUnet; see the file COPYING. If not, write to the
16;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17;;; Boston, MA 02110-1301, USA.
18
19;; Initially based on Guix commit eb0119efde826590a13973ab928c173780a7f257
20
21(define-module (gnunet packages texlive)
22 #:use-module ((guix licenses)
23 #:renamer (symbol-prefix-proc 'license:))
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages fontutils)
30 #:use-module (gnu packages ghostscript)
31 #:use-module (gnu packages icu4c)
32 #:use-module (gnu packages image)
33 #:use-module (gnu packages pdf)
34 #:use-module (gnu packages perl)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages compression))
38
39(define texlive-extra-src
40 (origin
41 (method url-fetch)
42 (uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-extra.tar.xz")
43 ;;(uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-extra.tar.xz")
44 (sha256 (base32
45 "0cb8fnv4x281gy5ka779f00ssdmdpjj4x3pkh9j9vq45hrwg3522"))))
46
47(define texlive-texmf-src
48 (origin
49 (method url-fetch)
50 (uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-texmf.tar.xz")
51 ;;(uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-texmf.tar.xz")
52 (sha256 (base32
53 "1fn1dg9k7pnh8a80j23zfkbrfnqyc4c2w4ss30dpkqj490nxsywq"))))
54
55;; Note that right now this does not include security fixes!
56;; FIXME: Needs more fixes, currently this fails building!
57
58(define-public texlive
59 (package
60 (name "texlive")
61 (version "2012")
62 (source (origin
63 (method url-fetch)
64 (uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-source.tar.xz")
65 ;;(uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-source.tar.xz")
66 (sha256 (base32
67 "10bcrdfsqnc6y3gqcb8ndnjy07i5kz63as39irbq4gmcbmyn2rln"))))
68 (build-system gnu-build-system)
69 (inputs `(("texlive-extra-src" ,texlive-extra-src)
70 ("texlive-texmf-src" ,texlive-texmf-src)
71 ("fontconfig" ,fontconfig)
72 ("freetype" ,freetype)
73 ("icu4c" ,icu4c)
74 ("ghostscript" ,ghostscript)
75 ("libpng" ,libpng)
76 ("perl" ,perl)
77 ("poppler" ,poppler)
78 ("pkg-config" ,pkg-config)
79 ;; FIXME: Add interpreters csh, fontforge and ruby,
80 ;; once they are available.
81 ("python" ,python)
82 ("teckit" ,teckit)
83 ("t1lib" ,t1lib)
84 ("zlib" ,zlib)
85 ("zziplib" ,zziplib)))
86 (outputs '("out" "data"))
87 (arguments
88 `(#:out-of-source? #t
89 #:configure-flags
90 `("--disable-native-texlive-build"
91 ;; Although the texmf and texmf-dist data is taken from
92 ;; texlive-texmf, setting datarootdir is still useful:
93 ;; "make install" creates symbolic links to scripts in this place.
94 ,(string-append "--datarootdir=" (assoc-ref %outputs "data"))
95 ,(string-append "--infodir=" (assoc-ref %outputs "out") "/share/info")
96 ,(string-append "--mandir=" (assoc-ref %outputs "out") "/share/man")
97 "--without-x" ; FIXME: Drop as soon as X is available.
98 "--with-system-freetype2"
99 ;; "--with-system-gd"
100 ;; "--with-system-graphite"
101 "--with-system-icu"
102 "--with-system-libgs"
103 "--with-system-libpng"
104 "--with-system-poppler"
105 "--with-system-t1lib"
106 "--with-system-teckit"
107 "--with-system-xpdf"
108 "--with-system-zlib"
109 "--with-system-zziplib")
110 #:phases
111 (alist-replace
112 'configure
113 (lambda* (#:key outputs #:allow-other-keys #:rest args)
114 (let ((configure (assoc-ref %standard-phases 'configure)))
115 (substitute* "utils/psutils/Makefile.in"
116 (("/usr/bin/env perl") (which "perl")))
117 (apply configure args)))
118 (alist-cons-after
119 'install 'postinst
120 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
121 (let ((texlive-extra (assoc-ref inputs "texlive-extra-src"))
122 (texlive-texmf (assoc-ref inputs "texlive-texmf-src"))
123 (out (assoc-ref outputs "out"))
124 (data (assoc-ref outputs "data"))
125 (unpack (assoc-ref %standard-phases 'unpack))
126 (patch-source-shebangs
127 (assoc-ref %standard-phases 'patch-source-shebangs)))
128 ;; Create symbolic links for the latex variants and their
129 ;; man pages.
130 (with-directory-excursion (string-append out "/bin/")
131 (for-each symlink
132 '("pdftex" "pdftex" "xetex" "luatex")
133 '("latex" "pdflatex" "xelatex" "lualatex")))
134 (with-directory-excursion (string-append out "/share/man/man1/")
135 (symlink "luatex.1" "lualatex.1"))
136 ;; Delete texmf and texmf-dist from "data", since they
137 ;; will be reinstalled from texlive-texmf.
138 (system* "rm" "-r" (string-append data "/texmf"))
139 (system* "rm" "-r" (string-append data "/texmf-dist"))
140 ;; Unpack texlive-extra and install tlpkg.
141 (mkdir "texlive-extra")
142 (with-directory-excursion "texlive-extra"
143 (apply unpack (list #:source texlive-extra))
144 (apply patch-source-shebangs (list #:source texlive-extra))
145 (system* "mv" "tlpkg" data)
146 (chdir ".."))
147 ;; Unpack and install texlive-texmf.
148 (mkdir "texlive-texmf")
149 (with-directory-excursion "texlive-texmf"
150 (apply unpack (list #:source texlive-texmf))
151 (apply patch-source-shebangs (list #:source texlive-texmf))
152 ;; Register "data" for kpathsea in texmf.cnf.
153 (substitute* "texmf/web2c/texmf.cnf"
154 (("TEXMFROOT = \\$SELFAUTOPARENT")
155 (string-append "TEXMFROOT = " data)))
156 (system* "mv" "texmf" data)
157 (system* "mv" "texmf-dist" data)
158 (chdir ".."))
159 ;; texmf.cnf must also be placed in "out", since kpsewhich does
160 ;; not know about "data" until it has found this file.
161 (mkdir (string-append out "/share/texmf"))
162 (mkdir (string-append out "/share/texmf/web2c"))
163 (copy-file (string-append data "/texmf/web2c/texmf.cnf")
164 (string-append out "/share/texmf/web2c/texmf.cnf"))))
165 (alist-cons-after 'patch-shebangs 'texconfig
166 (lambda* (#:key outputs #:allow-other-keys)
167 (let ((out (assoc-ref outputs "out")))
168 ;; Configure the texlive system; inspired from
169 ;; http://slackbuilds.org/repository/13.37/office/texlive/
170 (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
171 (system* "updmap-sys" "--nohash" "--syncwithtrees")
172 (system* "mktexlsr")
173 (system* "fmtutil-sys" "--all")))
174 %standard-phases)))))
175 (synopsis "Tex Live, a package of the TeX typesetting system")
176 (description
177 "TeX Live provides a comprehensive TeX document production system.
178It includes all the major TeX-related programs, macro packages, and fonts
179that are free software, including support for many languages around the
180world.")
181 (license (license:fsf-free "http://tug.org/texlive/copying.html"))
182 (home-page "http://www.tug.org/texlive/")))
diff --git a/doc/.gitignore b/doc/.gitignore
index daa5ccaa0..25617d1b0 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -1,7 +1,6 @@
1gnunet-c-tutorial.aux
2gnunet-c-tutorial.out
3*.log
4*.aux 1*.aux
2*.out
3*.log
5*.pdf 4*.pdf
6*.toc 5*.toc
7*.cp 6*.cp
@@ -11,3 +10,9 @@ gnunet-c-tutorial.out
11*.info 10*.info
12\#*\# 11\#*\#
13version.texi 12version.texi
13gnunet.info-1
14gnunet.info-2
15gnunet.info-3
16mdate-sh
17stamp-vti
18texinfo.tex
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 07aafbb51..1a8bb64b9 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -5,39 +5,76 @@ docdir = $(datadir)/doc/gnunet/
5 5
6infoimagedir = $(infodir)/images 6infoimagedir = $(infodir)/images
7 7
8#DOT_FILES = images/$(wildcard *.dot)
9
10#DOT_VECTOR_GRAPHICS = \
11# $(DOT_FILES:%.dot=%.eps) \
12# $(DOT_FILES:%.dot=%.pdf)
13
8dist_infoimage_DATA = \ 14dist_infoimage_DATA = \
9 %D%/images/gnunet-gtk-0-10-gns-a-done.png \ 15 images/gnunet-gtk-0-10-gns-a-done.png \
10 %D%/images/gnunet-gtk-0-10-gns-a.png \ 16 images/gnunet-gtk-0-10-gns-a.png \
11 %D%/images/daemon_lego_block.png \ 17 images/daemon_lego_block.png \
12 %D%/images/gnunet-gtk-0-10-gns.png \ 18 images/gnunet-gtk-0-10-gns.png \
13 %D%/images/gnunet-0-10-peerinfo.png \ 19 images/gnunet-0-10-peerinfo.png \
14 %D%/images/gnunet-gtk-0-10-identity.png \ 20 images/gnunet-gtk-0-10-identity.png \
15 %D%/images/gnunet-fs-gtk-0-10-star-tab.png \ 21 images/gnunet-fs-gtk-0-10-star-tab.png \
16 %D%/images/gnunet-gtk-0-10.png \ 22 images/gnunet-gtk-0-10.png \
17 %D%/images/gnunet-gtk-0-10-download-area.png \ 23 images/gnunet-gtk-0-10-download-area.png \
18 %D%/images/gnunet-gtk-0-10-search-selected.png \ 24 images/gnunet-gtk-0-10-search-selected.png \
19 %D%/images/gnunet-gtk-0-10-fs-menu.png \ 25 images/gnunet-gtk-0-10-fs-menu.png \
20 %D%/images/gnunet-gtk-0-10-traffic.png \ 26 images/gnunet-gtk-0-10-traffic.png \
21 %D%/images/gnunet-gtk-0-10-fs.png \ 27 images/gnunet-gtk-0-10-fs.png \
22 %D%/images/gnunet-namestore-gtk-phone.png \ 28 images/gnunet-namestore-gtk-phone.png \
23 %D%/images/gnunet-gtk-0-10-fs-publish-editing.png \ 29 images/gnunet-gtk-0-10-fs-publish-editing.png \
24 %D%/images/gnunet-namestore-gtk-vpn.png \ 30 images/gnunet-namestore-gtk-vpn.png \
25 %D%/images/gnunet-gtk-0-10-fs-published.png \ 31 images/gnunet-gtk-0-10-fs-published.png \
26 %D%/images/gnunet-setup-exit.png \ 32 images/gnunet-setup-exit.png \
27 %D%/images/gnunet-gtk-0-10-fs-publish.png \ 33 images/gnunet-gtk-0-10-fs-publish.png \
28 %D%/images/iceweasel-preferences.png \ 34 images/iceweasel-preferences.png \
29 %D%/images/gnunet-gtk-0-10-fs-publish-select.png \ 35 images/gnunet-gtk-0-10-fs-publish-select.png \
30 %D%/images/iceweasel-proxy.png \ 36 images/iceweasel-proxy.png \
31 %D%/images/gnunet-gtk-0-10-fs-publish-with-file_0.png \ 37 images/gnunet-gtk-0-10-fs-publish-with-file_0.png \
32 %D%/images/service_lego_block.png \ 38 images/service_lego_block.png \
33 %D%/images/gnunet-gtk-0-10-fs-publish-with-file.png \ 39 images/gnunet-gtk-0-10-fs-publish-with-file.png \
34 %D%/images/service_stack.png \ 40 images/service_stack.png \
35 %D%/images/gnunet-gtk-0-10-fs-search.png \ 41 images/gnunet-gtk-0-10-fs-search.png \
36 %D%/images/gnunet-tutorial-service.png \ 42 images/gnunet-tutorial-service.png \
37 %D%/images/gnunet-tutorial-system.png \ 43 images/gnunet-tutorial-system.png \
38 %D%/images/daemon_lego_block.svg \ 44 images/daemon_lego_block.svg \
39 %D%/images/lego_stack.svg \ 45 images/lego_stack.svg \
40 %D%/images/service_lego_block.svg 46 images/service_lego_block.svg \
47 images/structure.dot
48
49# images/$(wildcard *.png) \
50# images/$(wildcard *.svg)
51# $(DOT_FILES:%.dot=%.png)
52
53#DOT_OPTIONS = \
54# -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
55# -Nfontsite=9 -Nheight=.1 -Nwidth=.1
56
57# .dot.png:
58# $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
59# mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
60
61# .dot.pdf:
62# $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
63# mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
64
65# .dot.eps:
66# $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
67# mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
68
69# .png.eps:
70# $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
71# mv "$@-tmp.eps" "$@"
72
73# pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
74# info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
75# ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \
76# $(top_srcdir)/%D%/images/coreutils-size-map.eps
77# dvi-local: ps-local
41 78
42gnunet_tutorial_examples = \ 79gnunet_tutorial_examples = \
43 001.c \ 80 001.c \
@@ -67,25 +104,40 @@ gnunet_tutorial_examples = \
67 025.c \ 104 025.c \
68 026.c 105 026.c
69 106
70info_TEXINFOS = \ 107info_TEXINFOS = \
71 gnunet.texi \ 108 gnunet.texi \
72 gnunet-c-tutorial.texi 109 gnunet-c-tutorial.texi
73 110
74gnunet_TEXINFOS = \ 111gnunet_TEXINFOS = \
75 chapters/developer.texi \ 112 chapters/developer.texi \
76 chapters/installation.texi \ 113 chapters/installation.texi \
77 chapters/philosophy.texi \ 114 chapters/philosophy.texi \
78 chapters/user.texi \ 115 chapters/user.texi \
79 fdl-1.3.texi \ 116 fdl-1.3.texi \
80 gpl-3.0.texi 117 gpl-3.0.texi
81 118
82EXTRA_DIST = \ 119EXTRA_DIST = \
83 $(gnunet_TEXINFOS) \ 120 $(gnunet_TEXINFOS) \
84 $(gnunet_tutorial_examples) \ 121 outdated-and-old-installation-instructions.txt \
85 outdated-and-old-installation-instructions.txt \ 122 gnunet-c-tutorial-v1.pdf \
86 gnunet-c-tutorial-v1.pdf \ 123 $(gnunet_tutorial_examples) \
87 README.txt 124 README.txt
88 125
126
127# $(DOT_FILES) \
128# $(DOT_VECTOR_GRAPHICS)
129
130DISTCLEANFILES = \
131 gnunet.cps \
132 gnunet-c-tutorial.cps \
133 chapters/developer.cps \
134 chapters/installation.cps \
135 chapter/philosophy.cps \
136 chapters/user.cps \
137 fdl-1.3.cps \
138 gpl-3.0.cps
139
140# if HAVE_EXTENDED_DOCUMENTATION_BUILDING
89daemon_lego_block.png: images/daemon_lego_block.svg 141daemon_lego_block.png: images/daemon_lego_block.svg
90 convert images/daemon_lego_block.svg images/daemon_lego_block.png && 142 convert images/daemon_lego_block.svg images/daemon_lego_block.png &&
91 pngcrush images/daemon_lego_block.png images/daemon_lego_block.png 143 pngcrush images/daemon_lego_block.png images/daemon_lego_block.png
@@ -142,4 +194,39 @@ doc-info-tutorial-noise: version.texi
142 194
143doc-all-give-me-the-noise: doc-pdf-noise doc-html-noise doc-info-noise doc-pdf-tutorial-noise doc-html-tutorial-noise doc-info-tutorial-noise 195doc-all-give-me-the-noise: doc-pdf-noise doc-html-noise doc-info-noise doc-pdf-tutorial-noise doc-html-tutorial-noise doc-info-tutorial-noise
144 196
197doc-all-install: doc-all-give-me-the-noise
198 @mkdir -p $(DESTDIR)/$(docdir)
199 @mkdir -p $(DESTDIR)/$(infoimagedir)
200 @mkdir -p $(DESTDIR)/$(infodir)
201 @install -m 0755 gnunet.pdf $(DESTDIR)/$(docdir)
202 @install -m 0755 gnunet-c-tutorial.pdf $(DESTDIR)/$(docdir)
203 @install -m 0755 gnunet-c-tutorial.info $(DESTDIR)/$(infodir)
204 @install -m 0755 gnunet.info $(DESTDIR)/$(infodir)
205 @cp -r gnunet $(DESTDIR)/$(docdir)
206 @cp -r gnunet-c-tutorial $(DESTDIR)/$(docdir)
207
208# @cp -r images $(DESTDIR)/$(infoimagedir)
209
210# TODO: Add more to clean.
211# clean:
212# @rm gnunet.pdf
213# @rm gnunet-c-tutorial.pdf
214# @rm gnunet.info
215# @rm gnunet-c-tutorial.info
216
217# CLEANFILES = \
218# gnunet.log \
219# gnunet-c-tutorial.log \
220# $(wildcard *.aux) \
221# $(wildcard *.toc) \
222# $(wildcard *.cp) \
223# $(wildcard *.cps)
224
145.PHONY: version.texi 225.PHONY: version.texi
226# if HAVE_EXTENDED_DOCUMENTATION_BUILDING_PDF
227
228# if HAVE_EXTENDED_DOCUMENTATION_BUILDING_HTML
229
230# endif
231# endif
232# endif
diff --git a/doc/README.txt b/doc/README.txt
index 2abe479dd..fbbc24424 100644
--- a/doc/README.txt
+++ b/doc/README.txt
@@ -14,7 +14,7 @@ guix environment gnunet-doc
14 14
15You need to have Texinfo and Texlive in your path. 15You need to have Texinfo and Texlive in your path.
16sh bootstrap 16sh bootstrap
17./configure 17./configure --enable-documentation
18cd doc 18cd doc
19make doc-all-give-me-the-noise 19make doc-all-give-me-the-noise
20 20
diff --git a/doc/chapters/developer.texi b/doc/chapters/developer.texi
index e7f507746..f5493fd63 100644
--- a/doc/chapters/developer.texi
+++ b/doc/chapters/developer.texi
@@ -7261,13 +7261,14 @@ the research report.
7261@subsubsection Namespace Advertisements 7261@subsubsection Namespace Advertisements
7262 7262
7263@c %**end of header 7263@c %**end of header
7264@c %**FIXME: all zeroses -> ?
7264 7265
7265An @code{SBlock} with identifier ′all zeros′ is a signed 7266An @code{SBlock} with identifier all zeros is a signed
7266advertisement for a namespace. This special @code{SBlock} contains metadata 7267advertisement for a namespace. This special @code{SBlock} contains metadata
7267describing the content of the namespace. Instead of the name of the identifier 7268describing the content of the namespace. Instead of the name of the identifier
7268for a potential update, it contains the identifier for the root of the 7269for a potential update, it contains the identifier for the root of the
7269namespace. The URI should always be empty. The @code{SBlock} is signed with 7270namespace. The URI should always be empty. The @code{SBlock} is signed with
7270the content provder′s RSA private key (just like any other SBlock). Peers 7271the content provder's RSA private key (just like any other SBlock). Peers
7271can search for @code{SBlock}s in order to find out more about a namespace. 7272can search for @code{SBlock}s in order to find out more about a namespace.
7272 7273
7273@node KSBlocks 7274@node KSBlocks
diff --git a/doc/chapters/installation.texi b/doc/chapters/installation.texi
index edbad84de..14c10d2b0 100644
--- a/doc/chapters/installation.texi
+++ b/doc/chapters/installation.texi
@@ -1687,7 +1687,7 @@ dlltool --input-def ../include/libmySQL.def --dllname libmysql.dll
1687 Copy include\* to include\mysql\ 1687 Copy include\* to include\mysql\
1688 1688
1689@item 1689@item
1690 Pass "--with-mysql=/c/mysql" to ./configure and copy libmysql.dll to your PATH or GNUnet′s bin\ directory 1690 Pass "--with-mysql=/c/mysql" to ./configure and copy libmysql.dll to your PATH or GNUnet's @file{bin} directory
1691@end itemize 1691@end itemize
1692 1692
1693 1693
diff --git a/doc/gnunet-c-tutorial.texi b/doc/gnunet-c-tutorial.texi
index 4f56ae5c4..3a4200d7c 100644
--- a/doc/gnunet-c-tutorial.texi
+++ b/doc/gnunet-c-tutorial.texi
@@ -58,6 +58,48 @@ important and do not hesitate to contact the GNUnet team if you have
58any questions or problems! Check here how to contact the GNUnet 58any questions or problems! Check here how to contact the GNUnet
59team: @uref{https://gnunet.org/contact_information} 59team: @uref{https://gnunet.org/contact_information}
60 60
61@menu
62
63* Installing GNUnet:: Installing GNUnet
64* Introduction to GNUnet Architecture:: Introduction to GNUnet Architecture
65* First Steps with GNUnet:: First Steps with GNUnet
66* Developing Applications:: Developing Applications
67
68@detailmenu
69 --- The Detailed Node Listing ---
70
71Installing GNUnet
72
73* Obtaining a stable version::
74* Installing Build Tool Chain and Dependencies::
75* Obtaining the latest version from Git::
76* Compiling and Installing GNUnet::
77* Common Issues - Check your GNUnet installation::
78
79Introduction to GNUnet Architecture
80
81First Steps with GNUnet
82
83* Configure your peer::
84* Start a peer::
85* Monitor a peer::
86* Starting Two Peers by Hand::
87* Starting Peers Using the Testbed Service::
88
89Developing Applications
90
91* gnunet-ext::
92* Adapting the Template::
93* Writing a Client Application::
94* Writing a Service::
95* Interacting directly with other Peers using the CORE Service::
96* Storing peer-specific data using the PEERSTORE service::
97* Using the DHT::
98* Debugging with gnunet-arm::
99
100@end detailmenu
101@end menu
102
61@node Installing GNUnet 103@node Installing GNUnet
62@chapter Installing GNUnet 104@chapter Installing GNUnet
63 105
@@ -70,6 +112,14 @@ latest development version things can be broken, functionality can be changed or
70can fail. You should only use the development version if you know that you require a 112can fail. You should only use the development version if you know that you require a
71certain feature or a certain issue has been fixed since the last release. 113certain feature or a certain issue has been fixed since the last release.
72 114
115@menu
116* Obtaining a stable version::
117* Installing Build Tool Chain and Dependencies::
118* Obtaining the latest version from Git::
119* Compiling and Installing GNUnet::
120* Common Issues - Check your GNUnet installation::
121@end menu
122
73@node Obtaining a stable version 123@node Obtaining a stable version
74@section Obtaining a stable version 124@section Obtaining a stable version
75 125
@@ -150,6 +200,10 @@ $ sudo make install
150$ cd .. 200$ cd ..
151@end example 201@end example
152 202
203@menu
204* Installation::
205@end menu
206
153@node Installation 207@node Installation
154@subsection Installation 208@subsection Installation
155Assuming all dependencies are installed, the following commands will 209Assuming all dependencies are installed, the following commands will
@@ -210,8 +264,8 @@ PASS: test_gnunet_prefix
210============= 264=============
211@end example 265@end example
212 266
213@node Background: GNUnet Architecture 267@node Introduction to GNUnet Architecture
214@chapter Background: GNUnet Architecture 268@chapter Introduction to GNUnet Architecture
215 269
216GNUnet is organized in layers and services. Each service is composed of a 270GNUnet is organized in layers and services. Each service is composed of a
217main service implementation and a client library for other programs to use 271main service implementation and a client library for other programs to use
@@ -263,6 +317,14 @@ the programmer.
263@node First Steps with GNUnet 317@node First Steps with GNUnet
264@chapter First Steps with GNUnet 318@chapter First Steps with GNUnet
265 319
320@menu
321* Configure your peer::
322* Start a peer::
323* Monitor a peer::
324* Starting Two Peers by Hand::
325* Starting Peers Using the Testbed Service::
326@end menu
327
266@node Configure your peer 328@node Configure your peer
267@section Configure your peer 329@section Configure your peer
268 330
@@ -351,6 +413,12 @@ The process is rather painful, but the description is somewhat instructive.
351In practice, you might prefer the automated method 413In practice, you might prefer the automated method
352(@pxref{Starting Peers Using the Testbed Service}). 414(@pxref{Starting Peers Using the Testbed Service}).
353 415
416@menu
417* Setup a second peer::
418* Start the second peer and connect the peers::
419* How to connect manually::
420@end menu
421
354@node Setup a second peer 422@node Setup a second peer
355@subsection Setup a second peer 423@subsection Setup a second peer
356We will now start a second peer on your machine. 424We will now start a second peer on your machine.
@@ -540,6 +608,17 @@ network.
540@node Developing Applications 608@node Developing Applications
541@chapter Developing Applications 609@chapter Developing Applications
542 610
611@menu
612* gnunet-ext::
613* Adapting the Template::
614* Writing a Client Application::
615* Writing a Service::
616* Interacting directly with other Peers using the CORE Service::
617* Storing peer-specific data using the PEERSTORE service::
618* Using the DHT::
619* Debugging with gnunet-arm::
620@end menu
621
543@node gnunet-ext 622@node gnunet-ext
544@section gnunet-ext 623@section gnunet-ext
545To develop a new peer-to-peer application or to extend GNUnet we provide 624To develop a new peer-to-peer application or to extend GNUnet we provide
@@ -605,6 +684,12 @@ used, which is typically not needed):
605@verbatiminclude tutorial-examples/001.c 684@verbatiminclude tutorial-examples/001.c
606@end example 685@end example
607 686
687@menu
688* Handling command-line options::
689* Writing a Client Library::
690* Writing a user interface::
691@end menu
692
608@node Handling command-line options 693@node Handling command-line options
609@subsection Handling command-line options 694@subsection Handling command-line options
610 695
@@ -657,6 +742,12 @@ Unique message types must be defined for each message struct in the
657@file{gnunet\_protocols.h} header (or an extension-specific include 742@file{gnunet\_protocols.h} header (or an extension-specific include
658file). 743file).
659 744
745@menu
746* Connecting to the Service::
747* Sending messages::
748* Receiving Replies from the Service::
749@end menu
750
660@node Connecting to the Service 751@node Connecting to the Service
661@subsubsection Connecting to the Service 752@subsubsection Connecting to the Service
662 753
@@ -746,6 +837,11 @@ command-line to the service.
746Before you can test the client you've written so far, you'll need to also 837Before you can test the client you've written so far, you'll need to also
747implement the corresponding service. 838implement the corresponding service.
748 839
840@menu
841* Code Placement::
842* Starting a Service::
843@end menu
844
749@node Code Placement 845@node Code Placement
750@subsection Code Placement 846@subsection Code Placement
751 847
@@ -810,6 +906,13 @@ is connect to the @code{CORE} service using:
810@verbatiminclude tutorial-examples/009.c 906@verbatiminclude tutorial-examples/009.c
811@end example 907@end example
812 908
909@menu
910* New P2P connections::
911* Receiving P2P Messages::
912* Sending P2P Messages::
913* End of P2P connections::
914@end menu
915
813@node New P2P connections 916@node New P2P connections
814@subsection New P2P connections 917@subsection New P2P connections
815 918
@@ -900,6 +1003,13 @@ The first step is to start a connection to the PEERSTORE service:
900The service handle @code{peerstore_handle} will be needed for all subsequent 1003The service handle @code{peerstore_handle} will be needed for all subsequent
901PEERSTORE operations. 1004PEERSTORE operations.
902 1005
1006@menu
1007* Storing records::
1008* Retrieving records::
1009* Monitoring records::
1010* Disconnecting from PEERSTORE::
1011@end menu
1012
903@node Storing records 1013@node Storing records
904@subsection Storing records 1014@subsection Storing records
905 1015
@@ -992,6 +1102,13 @@ The second parameter indicates how many requests in parallel to expect.
992It is not a hard limit, but a good approximation will make the DHT more 1102It is not a hard limit, but a good approximation will make the DHT more
993efficient. 1103efficient.
994 1104
1105@menu
1106* Storing data in the DHT::
1107* Obtaining data from the DHT::
1108* Implementing a block plugin::
1109* Monitoring the DHT::
1110@end menu
1111
995@node Storing data in the DHT 1112@node Storing data in the DHT
996@subsection Storing data in the DHT 1113@subsection Storing data in the DHT
997Since the DHT is a dynamic environment (peers join and leave frequently) 1114Since the DHT is a dynamic environment (peers join and leave frequently)
@@ -1049,6 +1166,14 @@ in the service's respective directory. The
1049mandatory functions that need to be implemented for a block plugin are 1166mandatory functions that need to be implemented for a block plugin are
1050described in the following sections. 1167described in the following sections.
1051 1168
1169@menu
1170* Validating requests and replies::
1171* Deriving a key from a reply::
1172* Initialization of the plugin::
1173* Shutdown of the plugin::
1174* Integration of the plugin with the build system::
1175@end menu
1176
1052@node Validating requests and replies 1177@node Validating requests and replies
1053@subsubsection Validating requests and replies 1178@subsubsection Validating requests and replies
1054 1179
diff --git a/doc/structure.dot b/doc/images/structure.dot
index a53db90b8..a53db90b8 100644
--- a/doc/structure.dot
+++ b/doc/images/structure.dot
diff --git a/doc/man/gnunet-identity.1 b/doc/man/gnunet-identity.1
index b552ad6e3..50efa74d4 100644
--- a/doc/man/gnunet-identity.1
+++ b/doc/man/gnunet-identity.1
@@ -30,7 +30,7 @@ Print help page.
30 30
31.TP 31.TP
32\fB\-d\fR, \fB\-\-display\fR 32\fB\-d\fR, \fB\-\-display\fR
33display all ouf our egos 33display all of our egos
34 34
35.TP 35.TP
36\fB\-m\fR, \fB\-\-monitor\fR 36\fB\-m\fR, \fB\-\-monitor\fR
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 77b8409cd..cc56f5959 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -185,21 +185,22 @@ static void
185create_indices (sqlite3 * dbh) 185create_indices (sqlite3 * dbh)
186{ 186{
187 /* create indices */ 187 /* create indices */
188 if ((SQLITE_OK != 188 if (0 !=
189 (SQLITE_OK !=
189 sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_hash ON gn091 (hash)", 190 sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_hash ON gn091 (hash)",
190 NULL, NULL, NULL)) || 191 NULL, NULL, NULL)) +
191 (SQLITE_OK != 192 (SQLITE_OK !=
192 sqlite3_exec (dbh, 193 sqlite3_exec (dbh,
193 "CREATE INDEX IF NOT EXISTS idx_anon_type ON gn091 (anonLevel ASC,type)", 194 "CREATE INDEX IF NOT EXISTS idx_anon_type ON gn091 (anonLevel ASC,type)",
194 NULL, NULL, NULL)) || 195 NULL, NULL, NULL)) +
195 (SQLITE_OK != 196 (SQLITE_OK !=
196 sqlite3_exec (dbh, 197 sqlite3_exec (dbh,
197 "CREATE INDEX IF NOT EXISTS idx_expire ON gn091 (expire ASC)", 198 "CREATE INDEX IF NOT EXISTS idx_expire ON gn091 (expire ASC)",
198 NULL, NULL, NULL)) || 199 NULL, NULL, NULL)) +
199 (SQLITE_OK != 200 (SQLITE_OK !=
200 sqlite3_exec (dbh, 201 sqlite3_exec (dbh,
201 "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn091 (repl,rvalue)", 202 "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn091 (repl,rvalue)",
202 NULL, NULL, NULL))) 203 NULL, NULL, NULL)) )
203 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "sqlite", 204 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "sqlite",
204 "Failed to create indices: %s\n", sqlite3_errmsg (dbh)); 205 "Failed to create indices: %s\n", sqlite3_errmsg (dbh));
205} 206}
@@ -354,40 +355,24 @@ database_setup (const struct GNUNET_CONFIGURATION_Handle *cfg,
354 (SQLITE_OK != 355 (SQLITE_OK !=
355 sq_prepare (plugin->dbh, 356 sq_prepare (plugin->dbh,
356 "SELECT " RESULT_COLUMNS " FROM gn091 " 357 "SELECT " RESULT_COLUMNS " FROM gn091 "
357#if SQLITE_VERSION_NUMBER >= 3007000
358 "INDEXED BY idx_repl_rvalue "
359#endif
360 "WHERE repl=?2 AND " " (rvalue>=?1 OR " 358 "WHERE repl=?2 AND " " (rvalue>=?1 OR "
361 " NOT EXISTS (SELECT 1 FROM gn091 " 359 " NOT EXISTS (SELECT 1 FROM gn091 "
362#if SQLITE_VERSION_NUMBER >= 3007000
363 "INDEXED BY idx_repl_rvalue "
364#endif
365 "WHERE repl=?2 AND rvalue>=?1 LIMIT 1) ) " 360 "WHERE repl=?2 AND rvalue>=?1 LIMIT 1) ) "
366 "ORDER BY rvalue ASC LIMIT 1", 361 "ORDER BY rvalue ASC LIMIT 1",
367 &plugin->selRepl)) || 362 &plugin->selRepl)) ||
368 (SQLITE_OK != 363 (SQLITE_OK !=
369 sq_prepare (plugin->dbh, 364 sq_prepare (plugin->dbh,
370 "SELECT MAX(repl) FROM gn091" 365 "SELECT MAX(repl) FROM gn091",
371#if SQLITE_VERSION_NUMBER >= 3007000
372 " INDEXED BY idx_repl_rvalue"
373#endif
374 "",
375 &plugin->maxRepl)) || 366 &plugin->maxRepl)) ||
376 (SQLITE_OK != 367 (SQLITE_OK !=
377 sq_prepare (plugin->dbh, 368 sq_prepare (plugin->dbh,
378 "SELECT " RESULT_COLUMNS " FROM gn091 " 369 "SELECT " RESULT_COLUMNS " FROM gn091 "
379#if SQLITE_VERSION_NUMBER >= 3007000
380 "INDEXED BY idx_expire "
381#endif
382 "WHERE NOT EXISTS (SELECT 1 FROM gn091 WHERE expire < ?1 LIMIT 1) OR (expire < ?1) " 370 "WHERE NOT EXISTS (SELECT 1 FROM gn091 WHERE expire < ?1 LIMIT 1) OR (expire < ?1) "
383 "ORDER BY expire ASC LIMIT 1", 371 "ORDER BY expire ASC LIMIT 1",
384 &plugin->selExpi)) || 372 &plugin->selExpi)) ||
385 (SQLITE_OK != 373 (SQLITE_OK !=
386 sq_prepare (plugin->dbh, 374 sq_prepare (plugin->dbh,
387 "SELECT " RESULT_COLUMNS " FROM gn091 " 375 "SELECT " RESULT_COLUMNS " FROM gn091 "
388#if SQLITE_VERSION_NUMBER >= 3007000
389 "INDEXED BY idx_anon_type "
390#endif
391 "WHERE _ROWID_ >= ? AND " 376 "WHERE _ROWID_ >= ? AND "
392 "anonLevel = 0 AND " 377 "anonLevel = 0 AND "
393 "type = ? " 378 "type = ? "
diff --git a/src/fs/plugin_block_fs.c b/src/fs/plugin_block_fs.c
index 902519f15..c762835ce 100644
--- a/src/fs/plugin_block_fs.c
+++ b/src/fs/plugin_block_fs.c
@@ -71,17 +71,22 @@ block_plugin_fs_create_group (void *cls,
71 return NULL; 71 return NULL;
72 case GNUNET_BLOCK_TYPE_FS_UBLOCK: 72 case GNUNET_BLOCK_TYPE_FS_UBLOCK:
73 guard = va_arg (va, const char *); 73 guard = va_arg (va, const char *);
74 if (0 != strcmp (guard, 74 if (0 == strcmp (guard,
75 "seen-set-size")) 75 "seen-set-size"))
76 { 76 {
77 /* va-args invalid! bad bug, complain! */ 77 size = GNUNET_BLOCK_GROUP_compute_bloomfilter_size (va_arg (va, unsigned int),
78 GNUNET_break (0); 78 BLOOMFILTER_K);
79 size = 8; 79 }
80 else if (0 == strcmp (guard,
81 "filter-size"))
82 {
83 size = va_arg (va, unsigned int);
80 } 84 }
81 else 85 else
82 { 86 {
83 size = GNUNET_BLOCK_GROUP_compute_bloomfilter_size (va_arg (va, unsigned int), 87 /* va-args invalid! bad bug, complain! */
84 BLOOMFILTER_K); 88 GNUNET_break (0);
89 size = 8;
85 } 90 }
86 if (0 == size) 91 if (0 == size)
87 size = raw_data_size; /* not for us to determine, use what we got! */ 92 size = raw_data_size; /* not for us to determine, use what we got! */
diff --git a/src/include/gnunet_set_service.h b/src/include/gnunet_set_service.h
index 6e822d82e..a2999aebc 100644
--- a/src/include/gnunet_set_service.h
+++ b/src/include/gnunet_set_service.h
@@ -452,6 +452,8 @@ GNUNET_SET_listen (const struct GNUNET_CONFIGURATION_Handle *cfg,
452/** 452/**
453 * Cancel the given listen operation. After calling cancel, the 453 * Cancel the given listen operation. After calling cancel, the
454 * listen callback for this listen handle will not be called again. 454 * listen callback for this listen handle will not be called again.
455 * Note that cancelling a listen operation will automatically reject
456 * all operations that have not yet been accepted.
455 * 457 *
456 * @param lh handle for the listen operation 458 * @param lh handle for the listen operation
457 */ 459 */
@@ -556,7 +558,8 @@ GNUNET_SET_element_dup (const struct GNUNET_SET_Element *element);
556 * should be stored 558 * should be stored
557 */ 559 */
558void 560void
559GNUNET_SET_element_hash (const struct GNUNET_SET_Element *element, struct GNUNET_HashCode *ret_hash); 561GNUNET_SET_element_hash (const struct GNUNET_SET_Element *element,
562 struct GNUNET_HashCode *ret_hash);
560 563
561 564
562#if 0 /* keep Emacsens' auto-indent happy */ 565#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/multicast/.gitignore b/src/multicast/.gitignore
index 43752ec4b..a97844e81 100644
--- a/src/multicast/.gitignore
+++ b/src/multicast/.gitignore
@@ -3,3 +3,5 @@ gnunet-multicast
3test_multicast 3test_multicast
4test_multicast_multipeer 4test_multicast_multipeer
5test_multicast_2peers 5test_multicast_2peers
6test_multicast_multipeer_line
7test_multicast_multipeer_star
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c
index b75d4e291..8b47ed444 100644
--- a/src/peerinfo/peerinfo_api.c
+++ b/src/peerinfo/peerinfo_api.c
@@ -334,11 +334,12 @@ handle_info (void *cls,
334{ 334{
335 struct GNUNET_PEERINFO_Handle *h = cls; 335 struct GNUNET_PEERINFO_Handle *h = cls;
336 struct GNUNET_PEERINFO_IteratorContext *ic = h->ic_head; 336 struct GNUNET_PEERINFO_IteratorContext *ic = h->ic_head;
337 const struct GNUNET_HELLO_Message *hello; 337 const struct GNUNET_HELLO_Message *hello = NULL;
338 uint16_t ms; 338 uint16_t ms;
339 339
340 ms = ntohs (im->header.size); 340 ms = ntohs (im->header.size);
341 hello = (0 == ms) ? NULL : (const struct GNUNET_HELLO_Message *) &im[1]; 341 if (ms > sizeof (struct InfoMessage))
342 hello = (const struct GNUNET_HELLO_Message *) &im[1];
342 if (NULL != ic->callback) 343 if (NULL != ic->callback)
343 ic->callback (ic->callback_cls, 344 ic->callback (ic->callback_cls,
344 &im->peer, 345 &im->peer,
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
index c0b33f8ef..57f275c81 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
@@ -260,8 +260,6 @@ destroy_service_session (struct AliceServiceSession *s)
260 } 260 }
261 if (NULL != s->intersection_listen) 261 if (NULL != s->intersection_listen)
262 { 262 {
263 LOG (GNUNET_ERROR_TYPE_DEBUG,
264 "Set intersection, listen still up!\n");
265 GNUNET_SET_listen_cancel (s->intersection_listen); 263 GNUNET_SET_listen_cancel (s->intersection_listen);
266 s->intersection_listen = NULL; 264 s->intersection_listen = NULL;
267 } 265 }
@@ -274,8 +272,6 @@ destroy_service_session (struct AliceServiceSession *s)
274 } 272 }
275 if (NULL != s->intersection_set) 273 if (NULL != s->intersection_set)
276 { 274 {
277 LOG (GNUNET_ERROR_TYPE_DEBUG,
278 "Set intersection, set still there!\n");
279 GNUNET_SET_destroy (s->intersection_set); 275 GNUNET_SET_destroy (s->intersection_set);
280 s->intersection_set = NULL; 276 s->intersection_set = NULL;
281 } 277 }
@@ -809,10 +805,6 @@ cb_intersection_request_alice (void *cls,
809 prepare_client_end_notification (s); 805 prepare_client_end_notification (s);
810 return; 806 return;
811 } 807 }
812 GNUNET_SET_destroy (s->intersection_set);
813 s->intersection_set = NULL;
814 GNUNET_SET_listen_cancel (s->intersection_listen);
815 s->intersection_listen = NULL;
816} 808}
817 809
818 810
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_alice.c b/src/scalarproduct/gnunet-service-scalarproduct_alice.c
index a55d03900..fcb1ce032 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct_alice.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct_alice.c
@@ -243,8 +243,6 @@ free_element_cb (void *cls,
243static void 243static void
244destroy_service_session (struct AliceServiceSession *s) 244destroy_service_session (struct AliceServiceSession *s)
245{ 245{
246 unsigned int i;
247
248 if (GNUNET_YES == s->in_destroy) 246 if (GNUNET_YES == s->in_destroy)
249 return; 247 return;
250 s->in_destroy = GNUNET_YES; 248 s->in_destroy = GNUNET_YES;
@@ -285,7 +283,7 @@ destroy_service_session (struct AliceServiceSession *s)
285 } 283 }
286 if (NULL != s->sorted_elements) 284 if (NULL != s->sorted_elements)
287 { 285 {
288 for (i=0;i<s->used_element_count;i++) 286 for (unsigned int i=0;i<s->used_element_count;i++)
289 gcry_mpi_release (s->sorted_elements[i].value); 287 gcry_mpi_release (s->sorted_elements[i].value);
290 GNUNET_free (s->sorted_elements); 288 GNUNET_free (s->sorted_elements);
291 s->sorted_elements = NULL; 289 s->sorted_elements = NULL;
@@ -1043,10 +1041,6 @@ cb_intersection_request_alice (void *cls,
1043 prepare_client_end_notification (s); 1041 prepare_client_end_notification (s);
1044 return; 1042 return;
1045 } 1043 }
1046 GNUNET_SET_destroy (s->intersection_set);
1047 s->intersection_set = NULL;
1048 GNUNET_SET_listen_cancel (s->intersection_listen);
1049 s->intersection_listen = NULL;
1050} 1044}
1051 1045
1052 1046
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index f98d43a7d..42d06b275 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -155,6 +155,17 @@ static struct Listener *listener_head;
155static struct Listener *listener_tail; 155static struct Listener *listener_tail;
156 156
157/** 157/**
158 * Number of active clients.
159 */
160static unsigned int num_clients;
161
162/**
163 * Are we in shutdown? if #GNUNET_YES and the number of clients
164 * drops to zero, disconnect from CADET.
165 */
166static int in_shutdown;
167
168/**
158 * Counter for allocating unique IDs for clients, used to identify 169 * Counter for allocating unique IDs for clients, used to identify
159 * incoming operation requests from remote peers, that the client can 170 * incoming operation requests from remote peers, that the client can
160 * choose to accept or refuse. 0 must not be used (reserved for 171 * choose to accept or refuse. 0 must not be used (reserved for
@@ -485,6 +496,7 @@ client_connect_cb (void *cls,
485{ 496{
486 struct ClientState *cs; 497 struct ClientState *cs;
487 498
499 num_clients++;
488 cs = GNUNET_new (struct ClientState); 500 cs = GNUNET_new (struct ClientState);
489 cs->client = c; 501 cs->client = c;
490 cs->mq = mq; 502 cs->mq = mq;
@@ -616,13 +628,29 @@ client_disconnect_cb (void *cls,
616 GNUNET_CADET_close_port (listener->open_port); 628 GNUNET_CADET_close_port (listener->open_port);
617 listener->open_port = NULL; 629 listener->open_port = NULL;
618 while (NULL != (op = listener->op_head)) 630 while (NULL != (op = listener->op_head))
631 {
632 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
633 "Destroying incoming operation `%u' from peer `%s'\n",
634 (unsigned int) op->client_request_id,
635 GNUNET_i2s (&op->peer));
619 incoming_destroy (op); 636 incoming_destroy (op);
637 }
620 GNUNET_CONTAINER_DLL_remove (listener_head, 638 GNUNET_CONTAINER_DLL_remove (listener_head,
621 listener_tail, 639 listener_tail,
622 listener); 640 listener);
623 GNUNET_free (listener); 641 GNUNET_free (listener);
624 } 642 }
625 GNUNET_free (cs); 643 GNUNET_free (cs);
644 num_clients--;
645 if ( (GNUNET_YES == in_shutdown) &&
646 (0 == num_clients) )
647 {
648 if (NULL != cadet)
649 {
650 GNUNET_CADET_disconnect (cadet);
651 cadet = NULL;
652 }
653 }
626} 654}
627 655
628 656
@@ -1299,6 +1327,7 @@ handle_client_listen (void *cls,
1299 } 1327 }
1300 listener = GNUNET_new (struct Listener); 1328 listener = GNUNET_new (struct Listener);
1301 listener->cs = cs; 1329 listener->cs = cs;
1330 cs->listener = listener;
1302 listener->app_id = msg->app_id; 1331 listener->app_id = msg->app_id;
1303 listener->operation = (enum GNUNET_SET_OperationType) ntohl (msg->operation); 1332 listener->operation = (enum GNUNET_SET_OperationType) ntohl (msg->operation);
1304 GNUNET_CONTAINER_DLL_insert (listener_head, 1333 GNUNET_CONTAINER_DLL_insert (listener_head,
@@ -1917,10 +1946,14 @@ static void
1917shutdown_task (void *cls) 1946shutdown_task (void *cls)
1918{ 1947{
1919 /* Delay actual shutdown to allow service to disconnect clients */ 1948 /* Delay actual shutdown to allow service to disconnect clients */
1920 if (NULL != cadet) 1949 in_shutdown = GNUNET_YES;
1950 if (0 == num_clients)
1921 { 1951 {
1922 GNUNET_CADET_disconnect (cadet); 1952 if (NULL != cadet)
1923 cadet = NULL; 1953 {
1954 GNUNET_CADET_disconnect (cadet);
1955 cadet = NULL;
1956 }
1924 } 1957 }
1925 GNUNET_STATISTICS_destroy (_GSS_statistics, 1958 GNUNET_STATISTICS_destroy (_GSS_statistics,
1926 GNUNET_YES); 1959 GNUNET_YES);
diff --git a/src/set/test_set_intersection_result_full.c b/src/set/test_set_intersection_result_full.c
index a36aae4d5..16de983cf 100644
--- a/src/set/test_set_intersection_result_full.c
+++ b/src/set/test_set_intersection_result_full.c
@@ -131,8 +131,6 @@ listen_cb (void *cls,
131 "starting intersection by accepting and committing\n"); 131 "starting intersection by accepting and committing\n");
132 GNUNET_assert (NULL != context_msg); 132 GNUNET_assert (NULL != context_msg);
133 GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY); 133 GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY);
134 GNUNET_SET_listen_cancel (listen_handle);
135 listen_handle = NULL;
136 oh2 = GNUNET_SET_accept (request, 134 oh2 = GNUNET_SET_accept (request,
137 GNUNET_SET_RESULT_FULL, 135 GNUNET_SET_RESULT_FULL,
138 (struct GNUNET_SET_Option[]) { 0 }, 136 (struct GNUNET_SET_Option[]) { 0 },
diff --git a/src/set/test_set_union_result_symmetric.c b/src/set/test_set_union_result_symmetric.c
index f81c7b8f7..3008e5aac 100644
--- a/src/set/test_set_union_result_symmetric.c
+++ b/src/set/test_set_union_result_symmetric.c
@@ -182,8 +182,6 @@ listen_cb (void *cls,
182 GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY); 182 GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY);
183 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 183 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
184 "listen cb called\n"); 184 "listen cb called\n");
185 GNUNET_SET_listen_cancel (listen_handle);
186 listen_handle = NULL;
187 oh2 = GNUNET_SET_accept (request, 185 oh2 = GNUNET_SET_accept (request,
188 GNUNET_SET_RESULT_SYMMETRIC, 186 GNUNET_SET_RESULT_SYMMETRIC,
189 (struct GNUNET_SET_Option[]) { 0 }, 187 (struct GNUNET_SET_Option[]) { 0 },
diff --git a/src/social/test_social.c b/src/social/test_social.c
index 0dc2a9d30..64ef10125 100644
--- a/src/social/test_social.c
+++ b/src/social/test_social.c
@@ -57,6 +57,9 @@ struct GNUNET_PeerIdentity this_peer;
57 57
58struct GNUNET_IDENTITY_Handle *id; 58struct GNUNET_IDENTITY_Handle *id;
59 59
60const struct GNUNET_IDENTITY_Ego *identity_host_ego;
61const struct GNUNET_IDENTITY_Ego *identity_guest_ego;
62
60const struct GNUNET_SOCIAL_Ego *host_ego; 63const struct GNUNET_SOCIAL_Ego *host_ego;
61const struct GNUNET_SOCIAL_Ego *guest_ego; 64const struct GNUNET_SOCIAL_Ego *guest_ego;
62 65
@@ -69,8 +72,8 @@ struct GNUNET_CRYPTO_EcdsaPrivateKey *guest_key;
69struct GNUNET_CRYPTO_EddsaPublicKey place_pub_key; 72struct GNUNET_CRYPTO_EddsaPublicKey place_pub_key;
70struct GNUNET_HashCode place_pub_hash; 73struct GNUNET_HashCode place_pub_hash;
71 74
72struct GNUNET_CRYPTO_EcdsaPublicKey guest_pub_key; 75const struct GNUNET_CRYPTO_EcdsaPublicKey *guest_pub_key;
73struct GNUNET_CRYPTO_EcdsaPublicKey host_pub_key; 76const struct GNUNET_CRYPTO_EcdsaPublicKey *host_pub_key;
74 77
75struct GNUNET_PSYC_Slicer *host_slicer; 78struct GNUNET_PSYC_Slicer *host_slicer;
76struct GNUNET_PSYC_Slicer *guest_slicer; 79struct GNUNET_PSYC_Slicer *guest_slicer;
@@ -120,29 +123,28 @@ uint8_t is_guest_reconnected = GNUNET_NO;
120enum 123enum
121{ 124{
122 TEST_NONE = 0, 125 TEST_NONE = 0,
123 TEST_HOST_CREATE = 1, 126 TEST_IDENTITIES_CREATE = 1,
124 TEST_HOST_ENTER = 2, 127 TEST_HOST_ENTER = 2,
125 TEST_GUEST_CREATE = 3, 128 TEST_GUEST_ENTER = 3,
126 TEST_GUEST_ENTER = 4, 129 TEST_HOST_ANSWER_DOOR_REFUSE = 4,
127 TEST_HOST_ANSWER_DOOR_REFUSE = 5, 130 TEST_GUEST_RECV_ENTRY_DCSN_REFUSE = 5,
128 TEST_GUEST_RECV_ENTRY_DCSN_REFUSE = 6, 131 TEST_HOST_ANSWER_DOOR_ADMIT = 6,
129 TEST_HOST_ANSWER_DOOR_ADMIT = 7, 132 TEST_GUEST_RECV_ENTRY_DCSN_ADMIT = 9,
130 TEST_GUEST_RECV_ENTRY_DCSN_ADMIT = 8, 133 TEST_HOST_ANNOUNCE = 10,
131 TEST_HOST_ANNOUNCE = 9, 134 TEST_HOST_ANNOUNCE_END = 11,
132 TEST_HOST_ANNOUNCE_END = 10, 135 TEST_GUEST_TALK = 12,
133 TEST_GUEST_TALK = 11, 136 TEST_HOST_ANNOUNCE2 = 13,
134 TEST_HOST_ANNOUNCE2 = 12, 137 TEST_HOST_ANNOUNCE2_END = 14,
135 TEST_HOST_ANNOUNCE2_END = 13, 138 TEST_GUEST_HISTORY_REPLAY = 15,
136 TEST_GUEST_HISTORY_REPLAY = 14, 139 TEST_GUEST_HISTORY_REPLAY_LATEST = 16,
137 TEST_GUEST_HISTORY_REPLAY_LATEST = 15, 140 TEST_GUEST_LOOK_AT = 17,
138 TEST_GUEST_LOOK_AT = 16, 141 TEST_GUEST_LOOK_FOR = 18,
139 TEST_GUEST_LOOK_FOR = 17,
140 TEST_GUEST_LEAVE = 18, 142 TEST_GUEST_LEAVE = 18,
141 TEST_ZONE_ADD_PLACE = 19, 143 TEST_ZONE_ADD_PLACE = 20,
142 TEST_GUEST_ENTER_BY_NAME = 20, 144 TEST_GUEST_ENTER_BY_NAME = 21,
143 TEST_RECONNECT = 21, 145 TEST_RECONNECT = 22,
144 TEST_GUEST_LEAVE2 = 22, 146 TEST_GUEST_LEAVE2 = 23,
145 TEST_HOST_LEAVE = 23, 147 TEST_HOST_LEAVE = 24,
146} test; 148} test;
147 149
148 150
@@ -458,30 +460,42 @@ app_recv_guest (void *cls,
458 460
459 461
460static void 462static void
463enter_if_ready ()
464{
465 if (NULL == host_ego || NULL == guest_ego)
466 {
467 return;
468 }
469 host_enter ();
470 guest_init ();
471}
472
473
474static void
461app_recv_ego (void *cls, 475app_recv_ego (void *cls,
462 struct GNUNET_SOCIAL_Ego *ego, 476 struct GNUNET_SOCIAL_Ego *ego,
463 const struct GNUNET_CRYPTO_EcdsaPublicKey *ego_pub_key, 477 const struct GNUNET_CRYPTO_EcdsaPublicKey *ego_pub_key,
464 const char *name) 478 const char *name)
465{ 479{
466 char *ego_pub_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key); 480 char *ego_pub_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key);
467 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 481 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
468 "Test #%u: Got app ego notification: %p %s %s\n", 482 "Test #%u: Got app ego notification: %p %s %s\n",
469 test, ego, name, ego_pub_str); 483 test, ego, name, ego_pub_str);
470 GNUNET_free (ego_pub_str); 484 GNUNET_free (ego_pub_str);
471 485
472 if (NULL != strstr (name, host_name) && TEST_HOST_CREATE == test) 486 if (NULL != strstr (name, host_name))
473 { 487 {
474 host_ego = ego; 488 host_ego = ego;
475 host_pub_key = *(GNUNET_SOCIAL_ego_get_pub_key (host_ego)); 489 host_pub_key = ego_pub_key;
476 GNUNET_assert (TEST_HOST_CREATE == test); 490 GNUNET_assert (TEST_IDENTITIES_CREATE == test);
477 host_enter (); 491 enter_if_ready ();
478 } 492 }
479 else if (NULL != strstr (name, guest_name)) 493 else if (NULL != strstr (name, guest_name))
480 { 494 {
481 guest_ego = ego; 495 guest_ego = ego;
482 496 guest_pub_key = ego_pub_key;
483 if (TEST_GUEST_CREATE == test) 497 GNUNET_assert (TEST_IDENTITIES_CREATE == test);
484 guest_init (); 498 enter_if_ready ();
485 } 499 }
486} 500}
487 501
@@ -548,9 +562,9 @@ host_farewell (void *cls,
548 test, GNUNET_h2s (GNUNET_SOCIAL_nym_get_pub_key_hash (nym)), str); 562 test, GNUNET_h2s (GNUNET_SOCIAL_nym_get_pub_key_hash (nym)), str);
549 GNUNET_free (str); 563 GNUNET_free (str);
550 GNUNET_assert (1 == GNUNET_PSYC_env_get_count (env)); 564 GNUNET_assert (1 == GNUNET_PSYC_env_get_count (env));
551 if (0 != memcmp (&guest_pub_key, nym_key, sizeof (*nym_key))) 565 if (0 != memcmp (guest_pub_key, nym_key, sizeof (*nym_key)))
552 { 566 {
553 str = GNUNET_CRYPTO_ecdsa_public_key_to_string (&guest_pub_key); 567 str = GNUNET_CRYPTO_ecdsa_public_key_to_string (guest_pub_key);
554 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 568 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
555 "Test #%u: Farewell: nym does not match guest: %s\n", 569 "Test #%u: Farewell: nym does not match guest: %s\n",
556 test, str); 570 test, str);
@@ -1029,7 +1043,7 @@ guest_recv_entry_decision (void *cls,
1029 int is_admitted, 1043 int is_admitted,
1030 const struct GNUNET_PSYC_Message *entry_msg) 1044 const struct GNUNET_PSYC_Message *entry_msg)
1031{ 1045{
1032 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1046 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1033 "Test #%u: Guest received entry decision (try %u): %d.\n", 1047 "Test #%u: Guest received entry decision (try %u): %d.\n",
1034 test, join_req_count, is_admitted); 1048 test, join_req_count, is_admitted);
1035 1049
@@ -1121,7 +1135,7 @@ guest_recv_local_enter (void *cls, int result,
1121 const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, 1135 const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
1122 uint64_t max_message_id) 1136 uint64_t max_message_id)
1123{ 1137{
1124 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1138 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1125 "Test #%u: Guest entered to local place: %d\n", 1139 "Test #%u: Guest entered to local place: %d\n",
1126 test, result); 1140 test, result);
1127 GNUNET_assert (0 <= result); 1141 GNUNET_assert (0 <= result);
@@ -1131,7 +1145,7 @@ guest_recv_local_enter (void *cls, int result,
1131static void 1145static void
1132guest_enter () 1146guest_enter ()
1133{ 1147{
1134 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1148 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1135 "Test #%u: Entering to place as guest.\n", test); 1149 "Test #%u: Entering to place as guest.\n", test);
1136 1150
1137 struct GuestEnterMessage *emsg = &guest_enter_msg; 1151 struct GuestEnterMessage *emsg = &guest_enter_msg;
@@ -1200,7 +1214,7 @@ app_recv_zone_add_nym_result (void *cls, int64_t result,
1200static void 1214static void
1201guest_init () 1215guest_init ()
1202{ 1216{
1203 guest_pub_key = *(GNUNET_SOCIAL_ego_get_pub_key (guest_ego)); 1217 guest_pub_key = GNUNET_SOCIAL_ego_get_pub_key (guest_ego);
1204 1218
1205 guest_slicer = GNUNET_PSYC_slicer_create (); 1219 guest_slicer = GNUNET_PSYC_slicer_create ();
1206 GNUNET_PSYC_slicer_method_add (guest_slicer, "", NULL, 1220 GNUNET_PSYC_slicer_method_add (guest_slicer, "", NULL,
@@ -1210,10 +1224,25 @@ guest_init ()
1210 guest_recv_mod_foo_bar, &mod_foo_bar_rcls); 1224 guest_recv_mod_foo_bar, &mod_foo_bar_rcls);
1211 test = TEST_HOST_ANSWER_DOOR_ADMIT; 1225 test = TEST_HOST_ANSWER_DOOR_ADMIT;
1212 1226
1213 GNUNET_SOCIAL_zone_add_nym (app, guest_ego, "host", &host_pub_key, 1227 GNUNET_SOCIAL_zone_add_nym (app, guest_ego, "host", host_pub_key,
1214 GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES), 1228 GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES),
1215 app_recv_zone_add_nym_result, NULL); 1229 app_recv_zone_add_nym_result, NULL);
1216 guest_enter (); 1230}
1231
1232
1233static void
1234id_host_created (void *cls, const char *emsg)
1235{
1236 if (NULL != emsg)
1237 {
1238 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1239 "Test #%u: Could not create host identity: %s\n",
1240 test, emsg);
1241#if ! DEBUG_TEST_SOCIAL
1242 GNUNET_assert (0);
1243#endif
1244 }
1245
1217} 1246}
1218 1247
1219 1248
@@ -1229,8 +1258,8 @@ id_guest_created (void *cls, const char *emsg)
1229 GNUNET_assert (0); 1258 GNUNET_assert (0);
1230#endif 1259#endif
1231 } 1260 }
1232 if (NULL != guest_ego) 1261 //if (NULL != guest_ego)
1233 guest_init (); 1262 // guest_init ();
1234} 1263}
1235 1264
1236 1265
@@ -1241,12 +1270,10 @@ host_entered (void *cls, int result,
1241{ 1270{
1242 place_pub_key = *home_pub_key; 1271 place_pub_key = *home_pub_key;
1243 GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash); 1272 GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash);
1244 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1273 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1245 "Test #%u: Host entered to place %s\n", 1274 "Test #%u: Host entered to place %s\n",
1246 test, GNUNET_h2s (&place_pub_hash)); 1275 test, GNUNET_h2s (&place_pub_hash));
1247 1276 guest_enter ();
1248 test = TEST_GUEST_CREATE;
1249 GNUNET_IDENTITY_create (id, guest_name, &id_guest_created, NULL);
1250} 1277}
1251 1278
1252 1279
@@ -1258,7 +1285,7 @@ host_enter ()
1258 host_recv_method, host_recv_modifier, 1285 host_recv_method, host_recv_modifier,
1259 host_recv_data, host_recv_eom, NULL); 1286 host_recv_data, host_recv_eom, NULL);
1260 1287
1261 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1288 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1262 "Test #%u: Entering to place as host.\n", test); 1289 "Test #%u: Entering to place as host.\n", test);
1263 test = TEST_HOST_ENTER; 1290 test = TEST_HOST_ENTER;
1264 hst = GNUNET_SOCIAL_host_enter (app, host_ego, 1291 hst = GNUNET_SOCIAL_host_enter (app, host_ego,
@@ -1273,19 +1300,14 @@ host_enter ()
1273 1300
1274 1301
1275static void 1302static void
1276id_host_created (void *cls, const char *emsg) 1303start_app_if_ready ()
1277{ 1304{
1278 if (NULL != emsg) 1305 if (NULL == identity_host_ego || NULL == identity_guest_ego)
1279 { 1306 {
1280 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1307 return;
1281 "Test #%u: Could not create host identity: %s\n",
1282 test, emsg);
1283#if ! DEBUG_TEST_SOCIAL
1284 GNUNET_assert (0);
1285#endif
1286 } 1308 }
1287 1309 app = GNUNET_SOCIAL_app_connect (cfg,
1288 app = GNUNET_SOCIAL_app_connect (cfg, app_id, 1310 app_id,
1289 app_recv_ego, 1311 app_recv_ego,
1290 app_recv_host, 1312 app_recv_host,
1291 app_recv_guest, 1313 app_recv_guest,
@@ -1298,6 +1320,35 @@ static void
1298identity_ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, 1320identity_ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego,
1299 void **ctx, const char *name) 1321 void **ctx, const char *name)
1300{ 1322{
1323 if (NULL != ego)
1324 {
1325 if (ego == identity_host_ego)
1326 {
1327 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1328 "Host ego deleted\n");
1329 }
1330 else if (ego == identity_guest_ego)
1331 {
1332 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1333 "Guest ego deleted\n");
1334 }
1335 else if (0 == strcmp (name, host_name))
1336 {
1337 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1338 "Created ego %s\n",
1339 name);
1340 identity_host_ego = ego;
1341 start_app_if_ready ();
1342 }
1343 else if (0 == strcmp (name, guest_name))
1344 {
1345 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1346 "Created guest ego %s\n",
1347 name);
1348 identity_guest_ego = ego;
1349 start_app_if_ready ();
1350 }
1351 }
1301} 1352}
1302 1353
1303 1354
@@ -1326,8 +1377,9 @@ run (void *cls,
1326 1377
1327 id = GNUNET_IDENTITY_connect (cfg, &identity_ego_cb, NULL); 1378 id = GNUNET_IDENTITY_connect (cfg, &identity_ego_cb, NULL);
1328 1379
1329 test = TEST_HOST_CREATE; 1380 test = TEST_IDENTITIES_CREATE;
1330 GNUNET_IDENTITY_create (id, host_name, &id_host_created, NULL); 1381 GNUNET_IDENTITY_create (id, host_name, &id_host_created, NULL);
1382 GNUNET_IDENTITY_create (id, guest_name, &id_guest_created, NULL);
1331} 1383}
1332 1384
1333 1385
diff --git a/src/transport/tcp_server_legacy.c b/src/transport/tcp_server_legacy.c
index 6b4daa525..d0ce790fc 100644
--- a/src/transport/tcp_server_legacy.c
+++ b/src/transport/tcp_server_legacy.c
@@ -1477,23 +1477,6 @@ GNUNET_SERVER_connect_notify_cancel (struct GNUNET_SERVER_Handle *server,
1477 1477
1478 1478
1479/** 1479/**
1480 * Destroy the connection that is passed in via @a cls. Used
1481 * as calling #GNUNET_CONNECTION_destroy from within a function
1482 * that was itself called from within process_notify() of
1483 * 'connection.c' is not allowed (see #2329).
1484 *
1485 * @param cls connection to destroy
1486 */
1487static void
1488destroy_connection (void *cls)
1489{
1490 struct GNUNET_CONNECTION_Handle *connection = cls;
1491
1492 GNUNET_CONNECTION_destroy (connection);
1493}
1494
1495
1496/**
1497 * Ask the server to disconnect from the given client. 1480 * Ask the server to disconnect from the given client.
1498 * This is the same as returning #GNUNET_SYSERR from a message 1481 * This is the same as returning #GNUNET_SYSERR from a message
1499 * handler, except that it allows dropping of a client even 1482 * handler, except that it allows dropping of a client even
@@ -1565,8 +1548,7 @@ GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client)
1565 GNUNET_CONNECTION_persist_ (client->connection); 1548 GNUNET_CONNECTION_persist_ (client->connection);
1566 if (NULL != client->th.cth) 1549 if (NULL != client->th.cth)
1567 GNUNET_SERVER_notify_transmit_ready_cancel (&client->th); 1550 GNUNET_SERVER_notify_transmit_ready_cancel (&client->th);
1568 (void) GNUNET_SCHEDULER_add_now (&destroy_connection, 1551 GNUNET_CONNECTION_destroy (client->connection);
1569 client->connection);
1570 /* need to cancel again, as it might have been re-added 1552 /* need to cancel again, as it might have been re-added
1571 in the meantime (i.e. during callbacks) */ 1553 in the meantime (i.e. during callbacks) */
1572 if (NULL != client->warn_task) 1554 if (NULL != client->warn_task)
diff --git a/src/util/.gitignore b/src/util/.gitignore
index 3576a2134..d32a66833 100644
--- a/src/util/.gitignore
+++ b/src/util/.gitignore
@@ -67,3 +67,4 @@ test_socks.nc
67perf_crypto_asymmetric 67perf_crypto_asymmetric
68perf_crypto_hash 68perf_crypto_hash
69perf_crypto_symmetric 69perf_crypto_symmetric
70perf_crypto_rsa
diff --git a/src/util/network.c b/src/util/network.c
index 66a468e45..942288613 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -1793,10 +1793,18 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds,
1793 _("Fatal internal logic error, process hangs in `%s' (abort with CTRL-C)!\n"), 1793 _("Fatal internal logic error, process hangs in `%s' (abort with CTRL-C)!\n"),
1794 "select"); 1794 "select");
1795 } 1795 }
1796 tv.tv_sec = timeout.rel_value_us / GNUNET_TIME_UNIT_SECONDS.rel_value_us; 1796 if (timeout.rel_value_us / GNUNET_TIME_UNIT_SECONDS.rel_value_us > (unsigned long long) LONG_MAX)
1797 tv.tv_usec = 1797 {
1798 (timeout.rel_value_us - 1798 tv.tv_sec = LONG_MAX;
1799 (tv.tv_sec * GNUNET_TIME_UNIT_SECONDS.rel_value_us)); 1799 tv.tv_usec = 999999L;
1800 }
1801 else
1802 {
1803 tv.tv_sec = (long) (timeout.rel_value_us / GNUNET_TIME_UNIT_SECONDS.rel_value_us);
1804 tv.tv_usec =
1805 (timeout.rel_value_us -
1806 (tv.tv_sec * GNUNET_TIME_UNIT_SECONDS.rel_value_us));
1807 }
1800 return select (nfds, 1808 return select (nfds,
1801 (NULL != rfds) ? &rfds->sds : NULL, 1809 (NULL != rfds) ? &rfds->sds : NULL,
1802 (NULL != wfds) ? &wfds->sds : NULL, 1810 (NULL != wfds) ? &wfds->sds : NULL,
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index a7b1d8e2a..e9c25d68a 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -73,7 +73,7 @@
73 * Argument to be passed from the driver to 73 * Argument to be passed from the driver to
74 * #GNUNET_SCHEDULER_run_from_driver(). Contains the 74 * #GNUNET_SCHEDULER_run_from_driver(). Contains the
75 * scheduler's internal state. 75 * scheduler's internal state.
76 */ 76 */
77struct GNUNET_SCHEDULER_Handle 77struct GNUNET_SCHEDULER_Handle
78{ 78{
79 /** 79 /**
@@ -94,7 +94,7 @@ struct GNUNET_SCHEDULER_Handle
94 * Driver we used for the event loop. 94 * Driver we used for the event loop.
95 */ 95 */
96 const struct GNUNET_SCHEDULER_Driver *driver; 96 const struct GNUNET_SCHEDULER_Driver *driver;
97 97
98}; 98};
99 99
100 100
@@ -127,7 +127,7 @@ struct GNUNET_SCHEDULER_Task
127 * Handle to the scheduler's state. 127 * Handle to the scheduler's state.
128 */ 128 */
129 const struct GNUNET_SCHEDULER_Handle *sh; 129 const struct GNUNET_SCHEDULER_Handle *sh;
130 130
131 /** 131 /**
132 * Set of file descriptors this task is waiting 132 * Set of file descriptors this task is waiting
133 * for for reading. Once ready, this is updated 133 * for for reading. Once ready, this is updated
@@ -172,7 +172,7 @@ struct GNUNET_SCHEDULER_Task
172 * Size of the @e fds array. 172 * Size of the @e fds array.
173 */ 173 */
174 unsigned int fds_len; 174 unsigned int fds_len;
175 175
176 /** 176 /**
177 * Why is the task ready? Set after task is added to ready queue. 177 * Why is the task ready? Set after task is added to ready queue.
178 * Initially set to zero. All reasons that have already been 178 * Initially set to zero. All reasons that have already been
@@ -1849,7 +1849,7 @@ GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task *task,
1849 * 1849 *
1850 * @param sh scheduler handle that was given to the `loop` 1850 * @param sh scheduler handle that was given to the `loop`
1851 * @return #GNUNET_OK if there are more tasks that are ready, 1851 * @return #GNUNET_OK if there are more tasks that are ready,
1852 * and thus we would like to run more (yield to avoid 1852 * and thus we would like to run more (yield to avoid
1853 * blocking other activities for too long) 1853 * blocking other activities for too long)
1854 * #GNUNET_NO if we are done running tasks (yield to block) 1854 * #GNUNET_NO if we are done running tasks (yield to block)
1855 * #GNUNET_SYSERR on error 1855 * #GNUNET_SYSERR on error
@@ -1876,11 +1876,11 @@ GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh)
1876 pending_timeout_last = NULL; 1876 pending_timeout_last = NULL;
1877 queue_ready_task (pos); 1877 queue_ready_task (pos);
1878 } 1878 }
1879 1879
1880 if (0 == ready_count) 1880 if (0 == ready_count)
1881 return GNUNET_NO; 1881 return GNUNET_NO;
1882 1882
1883 /* find out which task priority level we are going to 1883 /* find out which task priority level we are going to
1884 process this time */ 1884 process this time */
1885 max_priority_added = GNUNET_SCHEDULER_PRIORITY_KEEP; 1885 max_priority_added = GNUNET_SCHEDULER_PRIORITY_KEEP;
1886 GNUNET_assert (NULL == ready_head[GNUNET_SCHEDULER_PRIORITY_KEEP]); 1886 GNUNET_assert (NULL == ready_head[GNUNET_SCHEDULER_PRIORITY_KEEP]);