Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1631834 > unrolled thread

[PATCH v2] plugin python: Adjust the handling after PyRun_String() failed

Started byTaeung Song <treeze.taeung@gmail.com>
First post2017-04-27 05:00 +0200
Last post2017-04-27 05:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] plugin python: Adjust the handling after PyRun_String() failed Taeung Song <treeze.taeung@gmail.com> - 2017-04-27 05:00 +0200

#1631834 — [PATCH v2] plugin python: Adjust the handling after PyRun_String() failed

FromTaeung Song <treeze.taeung@gmail.com>
Date2017-04-27 05:00 +0200
Subject[PATCH v2] plugin python: Adjust the handling after PyRun_String() failed
Message-ID<tAHOV-2IP-7@gated-at.bofh.it>
Even though PyRun_String() failed,
just 0 will be returned but we need to return -1
that means error status, so fix it.

Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
 plugin_python.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugin_python.c b/plugin_python.c
index 2997679..c283ed7 100644
--- a/plugin_python.c
+++ b/plugin_python.c
@@ -55,7 +55,7 @@ static int load_plugin(struct pevent *pevent, const char *path,
 
 	free(load);
 
-	return 0;
+	return res ? 0 : -1;
 }
 
 int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web