Skip to content

Commit

Permalink
Merge pull request #9 from snoweye/master
Browse files Browse the repository at this point in the history
0.2-5
  • Loading branch information
snoweye authored Dec 7, 2016
2 parents c2c4b7f + 98a5be0 commit c1f07a2
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 18 deletions.
17 changes: 17 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
2016-12-04: Ver 0.2-5
* Patch zeromq checking return code problem for sodium_init().
See the discussion at https://github.com/zeromq/libzmq/issues/1632 and
https://github.com/zeromq/libzmq/issues/1635 . This causes warning to stop
because changes were made in new version of libsodium.

curve_client.cpp: In constructor 'zmq::curve_client_t::curve_client_t(const zmq::options_t&)':
curve_client.cpp:51:18: error: ignoring return value of 'int sodium_init()', declared with attribute warn_unused_result [-Werror=unused-result]
sodium_init();
^
cc1plus: all warnings being treated as errors
Makefile:728: recipe for target 'libzmq_la-curve_client.lo' failed
make[2]: *** [libzmq_la-curve_client.lo] Error 1

The patch is based on
https://github.com/zeromq/libzmq/commit/479db2113643e459c11db392e0fefd6400657c9e .

2016-08-06: Ver 0.2-4
* Export zmq header files.
* Add get.zmq.cppflags() and get.zmq.ldflags() to "R/get_conf.r".
Expand Down
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pbdZMQ
Version: 0.2-4
Date: 2016-09-21
Version: 0.2-5
Date: 2016-12-04
Title: Programming with Big Data -- Interface to ZeroMQ
Authors@R: c(person("Wei-Chen", "Chen", role = c("aut", "cre"), email =
"[email protected]"),
Expand All @@ -16,6 +16,7 @@ Authors@R: c(person("Wei-Chen", "Chen", role = c("aut", "cre"), email =
person("Philipp", "A.", role = "ctb", comment = "Fedora"))
Depends: R (>= 3.0.0)
Imports: R6
Enhances: pbdRPC, remoter
LazyLoad: yes
LazyData: yes
Copyright: See files AUTHORS, COPYING, COPYING.LESSER, and MAINTAINERS
Expand All @@ -37,3 +38,4 @@ BugReports: http://group.r-pbd.org/
MailingList: Please send questions and comments regarding pbdR to
[email protected]
NeedsCompilation: yes
Maintainer: Wei-Chen Chen <[email protected]>
6 changes: 1 addition & 5 deletions inst/doc/pbdZMQ-guide.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@
\author{
\begin{minipage}{6in}
\centering
Wei-Chen Chen$^1$ and Drew Schmidt$^2$
Wei-Chen Chen$^1$ and Drew Schmidt$^1$
\end{minipage}
\\
\\
$^1$pbdR Core Team \\
\\
$^2$Business Analytics and Statistics, \\
University of Tennessee, \\
Knoxville, TN, USA \\
%\\
%\\
%\today
Expand Down
Binary file modified inst/doc/pbdZMQ-guide.pdf
Binary file not shown.
6 changes: 4 additions & 2 deletions src/zmqsrc/src/curve_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ zmq::curve_client_t::curve_client_t (const options_t &options_) :
cn_peer_nonce(1),
sync()
{
int rc;
memcpy (public_key, options_.curve_public_key, crypto_box_PUBLICKEYBYTES);
memcpy (secret_key, options_.curve_secret_key, crypto_box_SECRETKEYBYTES);
memcpy (server_key, options_.curve_server_key, crypto_box_PUBLICKEYBYTES);
Expand All @@ -48,11 +49,12 @@ zmq::curve_client_t::curve_client_t (const options_t &options_) :
randombytes(tmpbytes, 4);
#else
// todo check return code
sodium_init();
rc = sodium_init ();
zmq_assert (rc != -1);
#endif

// Generate short-term key pair
const int rc = crypto_box_keypair (cn_public, cn_secret);
rc = crypto_box_keypair (cn_public, cn_secret);
zmq_assert (rc == 0);
}

Expand Down
6 changes: 4 additions & 2 deletions src/zmqsrc/src/curve_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ zmq::curve_server_t::curve_server_t (session_base_t *session_,
cn_peer_nonce(1),
sync()
{
int rc;
// Fetch our secret key from socket options
memcpy (secret_key, options_.curve_secret_key, crypto_box_SECRETKEYBYTES);
scoped_lock_t lock (sync);
Expand All @@ -51,11 +52,12 @@ zmq::curve_server_t::curve_server_t (session_base_t *session_,
randombytes(tmpbytes, 4);
#else
// todo check return code
sodium_init();
rc = sodium_init ();
zmq_assert (rc != -1);
#endif

// Generate short-term key pair
const int rc = crypto_box_keypair (cn_public, cn_secret);
rc = crypto_box_keypair (cn_public, cn_secret);
zmq_assert (rc == 0);
}

Expand Down
6 changes: 1 addition & 5 deletions vignettes/pbdZMQ-guide.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@
\author{
\begin{minipage}{6in}
\centering
Wei-Chen Chen$^1$ and Drew Schmidt$^2$
Wei-Chen Chen$^1$ and Drew Schmidt$^1$
\end{minipage}
\\
\\
$^1$pbdR Core Team \\
\\
$^2$Business Analytics and Statistics, \\
University of Tennessee, \\
Knoxville, TN, USA \\
%\\
%\\
%\today
Expand Down
2 changes: 1 addition & 1 deletion vignettes/pbdZMQ-include/01-copyright.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

\null
\vfill
\copyright\ 2015-2016 Wei-Chen Chen and Drew Schmidt.
\copyright\ 2015-2017 Wei-Chen Chen and Drew Schmidt.

Permission is granted to make and distribute verbatim copies of
this vignette and its source provided the copyright notice and
Expand Down
2 changes: 1 addition & 1 deletion vignettes/pbdZMQ-include/05-cs.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\section[A Basic Client/Server]{A Basic Client/Server}
\label{sec:backward}
\label{sec:cs}
\addcontentsline{toc}{section}{\thesection. A Basic Client/Server}


Expand Down

0 comments on commit c1f07a2

Please sign in to comment.