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: example compiles again


From: gnunet
Subject: [GNUnet-SVN] [gnunet-nim] branch master updated: example compiles again
Date: Sat, 30 Mar 2019 18:57:25 +0100

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

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

The following commit(s) were added to refs/heads/master by this push:
     new ab97a08  example compiles again
ab97a08 is described below

commit ab97a08483401dbc2674179fb64253fc8bdf897a
Author: lurchi <address@hidden>
AuthorDate: Sat Mar 30 18:57:06 2019 +0100

    example compiles again
---
 examples/gnunet_nim.nim | 11 +++++------
 1 file changed, 5 insertions(+), 6 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()

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



reply via email to

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