gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet-nim] branch master updated (9503c83 -> a1cbed1)


From: gnunet
Subject: [GNUnet-SVN] [gnunet-nim] branch master updated (9503c83 -> a1cbed1)
Date: Sun, 23 Jun 2019 11:11:02 +0200

This is an automated email from the git hooks/post-receive script.

lurchi pushed a change to branch master
in repository gnunet-nim.

    from 9503c83  changed README
     new ab97a08  example compiles again
     new 75dd47f  Merge branch 'master' of ssh://gnunet.org/gnunet-nim
     new a1cbed1  fix version

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 examples/gnunet_nim.nim | 11 +++++------
 gnunet_nim.nimble       |  2 +-
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/examples/gnunet_nim.nim b/examples/gnunet_nim.nim
index ec53b5b..05228a6 100644
--- a/examples/gnunet_nim.nim
+++ b/examples/gnunet_nim.nim
@@ -1,6 +1,5 @@
-import ../gnunet_application
+import ../src/gnunet_nim, ../src/gnunet_nim/cadet
 import ../asyncdispatch, ../asyncfutures, ../asyncfile
-import ../asynccadet
 import parseopt
 import strutils
 import posix
@@ -12,16 +11,16 @@ proc firstTask(gnunetApp: ref GnunetApplication,
                outputFilename: string) {.async.} =
   var cadet = await gnunetApp.initCadet()
   var cadetChannel: ref CadetChannel
-  if peer.isNil() and not port.isNil():
+  if (peer == "") and not (port == ""):
     let cadetPort = cadet.openPort(port)
     let (hasChannel, channel) = await cadetPort.channels.read()
     if not hasChannel:
       return
     echo "incoming connection!"
     cadetChannel = channel
-  elif not peer.isNil() and not port.isNil():
+  elif not (peer == "") and not (port == ""):
     cadetChannel = cadet.createChannel(peer, port)
-  if not inputFilename.isNil():
+  if not (inputFilename == ""):
     let inputFile = openAsync(inputFilename, fmRead)
     while true:
       # 64k is close to the limit of GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE
@@ -30,7 +29,7 @@ proc firstTask(gnunetApp: ref GnunetApplication,
         break
       cadetChannel.sendMessage(content)
     inputFile.close()
-  elif not outputFilename.isNil():
+  elif not (outputFilename == ""):
     let outputFile = openAsync(outputFilename, fmWrite)
     while true:
       let (hasData, message) = await cadetChannel.messages.read()
diff --git a/gnunet_nim.nimble b/gnunet_nim.nimble
index a870eae..d807df4 100644
--- a/gnunet_nim.nimble
+++ b/gnunet_nim.nimble
@@ -1,5 +1,5 @@
 # package:
-version = "0.0.0"
+version = "0.1.0"
 author = "secushare"
 description = "GNUnet Nim bindings"
 license = "AGPL3"

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]