gnunet-developers
[Top][All Lists]
Advanced

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

Re: [GNUnet-developers] Please review: C implementation of gnunet-qr


From: Schanzenbach, Martin
Subject: Re: [GNUnet-developers] Please review: C implementation of gnunet-qr
Date: Sun, 3 Mar 2019 11:33:56 +0100

Hi,

thank you for the contribution!

A few points:
1.
The first thing you should do it use GNUNET_PROGRAM*.
Please look at the main of, for example, gnunet-ecc.c.
This is how argument parsing and program invocation in gnunet is done.
This also applies for gnunet-qr.

2. Instead of calling the gnunet-uri CLI through a fork, you should just handle 
the value inside the QR code.
This means that you need to look at what happens in gnunet-uri and follow that 
logic mostly.
This will automatically allow you to do proper error handling in combination 
with (1).
Calling binaries like this is only a last report IMO.

3.
No code in headers unless it is shared functionality (looking at you, 
gnunet-qr-utils.h).
I would assume that you do not need a header for this program at all. Just put 
it all in 1 file (gnunet-qr,c)

BR
Martin

> On 3. Mar 2019, at 11:03, Hartmut Goebel <address@hidden> wrote:
> 
> Hi,
> 
> I just pushed the branch "gnunt-qt-c".
> 
> Please review and give feedback. And somebody is asked to implement
> c-style error handling (or guide me): The "processor" must be cleaned up
> at the end, even if an error occurred. How is this done in C?
> 
> Please do not merge yet! IMHO error handling should be done first.
> 
> --
> Regards
> Hartmut Goebel
> 
> | Hartmut Goebel          | address@hidden               |
> | www.crazy-compilers.com | compilers which you thought are impossible |
> 
> 
> _______________________________________________
> GNUnet-developers mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnunet-developers

Attachment: signature.asc
Description: Message signed with OpenPGP


reply via email to

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