* [PATCH] resolve: fix runtime error if netconfig is not enabled
@ 2019-11-13 17:45 James Prestwood
2019-11-13 17:52 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: James Prestwood @ 2019-11-13 17:45 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 676 bytes --]
If the resolve module was not enabled in the config file, IWD fails
to start since resolve_init was returning -EINVAL. Since netconfig
is optional, we just return successfully here.
---
src/resolve.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/resolve.c b/src/resolve.c
index 83ac3547..fea9c2bd 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -427,8 +427,9 @@ void __resolve_set_config(struct l_settings *config)
static int resolve_init(void)
{
+ /* This module is not enabled in config */
if (!method.ops)
- return -EINVAL;
+ return 0;
if (method.ops->init)
method.data = method.ops->init();
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] resolve: fix runtime error if netconfig is not enabled
2019-11-13 17:45 [PATCH] resolve: fix runtime error if netconfig is not enabled James Prestwood
@ 2019-11-13 17:52 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2019-11-13 17:52 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 334 bytes --]
Hi James,
> If the resolve module was not enabled in the config file, IWD fails
> to start since resolve_init was returning -EINVAL. Since netconfig
> is optional, we just return successfully here.
> ---
> src/resolve.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
patch has been applied.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-13 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 17:45 [PATCH] resolve: fix runtime error if netconfig is not enabled James Prestwood
2019-11-13 17:52 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.