Message ID | 1551971455-3323-2-git-send-email-philippe.reynes@softathome.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] client: add option -d for dryrun | expand |
On 07/03/19 16:10, Philippe Reynes wrote: > When using the API for external programs, the network thread > only set the option dryrun in the configuration, so if this > option is set once, it's set forever. Instead we set it each > time, so it's now possible to use the API for external programs > with dryrun then run it withtout dryrun. > > Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> > --- > corelib/stream_interface.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/corelib/stream_interface.c b/corelib/stream_interface.c > index 8a07761..1261958 100644 > --- a/corelib/stream_interface.c > +++ b/corelib/stream_interface.c > @@ -350,6 +350,8 @@ void *network_initializer(void *data) > */ > if (inst.dry_run) > software->globals.dry_run = 1; > + else > + software->globals.dry_run = 0; > > /* > * Check if the stream should be saved > Acked-by: Stefano Babic <sbabic@denx.de> Best regards, Stefano Babic
diff --git a/corelib/stream_interface.c b/corelib/stream_interface.c index 8a07761..1261958 100644 --- a/corelib/stream_interface.c +++ b/corelib/stream_interface.c @@ -350,6 +350,8 @@ void *network_initializer(void *data) */ if (inst.dry_run) software->globals.dry_run = 1; + else + software->globals.dry_run = 0; /* * Check if the stream should be saved
When using the API for external programs, the network thread only set the option dryrun in the configuration, so if this option is set once, it's set forever. Instead we set it each time, so it's now possible to use the API for external programs with dryrun then run it withtout dryrun. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> --- corelib/stream_interface.c | 2 ++ 1 file changed, 2 insertions(+)