Message ID | 20210715180441.21379-1-JPEWhacker@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | Fix lua progress reports | expand |
Hi Joshua, On 15.07.21 20:04, Joshua Watt wrote: > The wrong constant was being used to report progress from lua handlers > > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> > --- > corelib/lua_interface.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c > index a6da6f2..14148c7 100644 > --- a/corelib/lua_interface.c > +++ b/corelib/lua_interface.c > @@ -962,7 +962,7 @@ static int luaopen_swupdate(lua_State *L) > lua_push_enum(L, "DOWNLOAD", DOWNLOAD); > lua_push_enum(L, "DONE", DONE); > lua_push_enum(L, "SUBPROCESS", SUBPROCESS); > - lua_push_enum(L, "PROGRESS", SUBPROCESS); > + lua_push_enum(L, "PROGRESS", PROGRESS); > lua_settable(L, -3); > > /* export the root device type */ > This looks straightforward, but it is not. I should test it. The SUBPROCESS was a way to push info values from Lua to an external process. The message goes through to the process_notifier() function, and this (surprising..) send the INFO to the progress interface. I guess because at the time something was not ready or not working (I cannot remember myself). However, the progress_notifier(), that is the function that will be called after this patch, is doing exactly the same, so your patch seems correct. I will just test it before applying. Best regards, Stefano
diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c index a6da6f2..14148c7 100644 --- a/corelib/lua_interface.c +++ b/corelib/lua_interface.c @@ -962,7 +962,7 @@ static int luaopen_swupdate(lua_State *L) lua_push_enum(L, "DOWNLOAD", DOWNLOAD); lua_push_enum(L, "DONE", DONE); lua_push_enum(L, "SUBPROCESS", SUBPROCESS); - lua_push_enum(L, "PROGRESS", SUBPROCESS); + lua_push_enum(L, "PROGRESS", PROGRESS); lua_settable(L, -3); /* export the root device type */
The wrong constant was being used to report progress from lua handlers Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> --- corelib/lua_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)