gnunet-developers
[Top][All Lists]
Advanced

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

Re: [GNUnet-developers] Two questions regarding CADET application


From: Heiko Stamer
Subject: Re: [GNUnet-developers] Two questions regarding CADET application
Date: Fri, 30 Dec 2016 15:41:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

Am 29.12.2016 um 17:52 schrieb Christian Grothoff:

> Ideally, your application should pick such a hash-port at random or
> based on a shared secret of the various participants. In the rare cases
> where you do need to hard code one, just use a string describing the
> purpose and hash that.

For CADET port numbers I can do the port selection in the described way.
However, what's about the GNUNET message types?

>> 2) GNUNET_PROGRAM_run() does not terminates, if services (i.e. ARM) are
>> not running. Is this behavior intended? (Workaround: should I use exit
>> in shutdown task?)
> 
> GNUNET_PROGRAM_run() will only terminate once all activities of your
> process have terminated. Usually, the issue behind such non-termination
> is that you need to install a shutdown task and use it to explicitly
> stop ongoing actions.

This is exactly what I did. I implemented a shutdown task (registered
with GNUNET_SCHEDULER_add_shutdown) which is called in case of errors
and e.g. by interrupting the main loop through SIGTERM. When GNUNET
services are running, everything terminates fine. Otherwise the control
also left this shutdown task but the calling GNUNET_PROGRAM_run() does
not terminates while trying to connect to ARM service. As a workaround I
can call exit(GNUNET_OK) in the shutdown task, but I guess this is not
intended?

Bests,
Heiko.



reply via email to

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