Bug 408096 - TreeManager R8 branch: extvars should support EXTVARS_TYPE_NIL as a possible type in "get_leaf_value" function
Summary: TreeManager R8 branch: extvars should support EXTVARS_TYPE_NIL as a possible ...
Status: RESOLVED FIXED
Alias: None
Product: Mihini
Classification: IoT
Component: Agent (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P1 normal (vote)
Target Milestone: 0.9 M1   Edit
Assignee: Project Inbox CLA
QA Contact: Robert Jacolin CLA
URL:
Whiteboard:
Keywords:
: 406520 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-15 05:08 EDT by Gilles Cannenterre CLA
Modified: 2013-05-22 10:57 EDT (History)
3 users (show)

See Also:
contact: iplog+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gilles Cannenterre CLA 2013-05-15 05:08:51 EDT
R8 branch TreeManager extvars.c should support type EXTVARS_TYPE_NIL in the get_leaf_value.

suggested fix:

Index: extvars.c
===================================================================
--- extvars.c	(revision 18581)
+++ extvars.c	(working copy)
@@ -148,6 +148,7 @@
     case EXTVARS_TYPE_INT:    lua_pushinteger( L, *(int*)        value); break;
     case EXTVARS_TYPE_DOUBLE: lua_pushnumber(  L, *(double*)     value); break;
     case EXTVARS_TYPE_BOOL:   lua_pushboolean( L, *(int*)        value); break;
+    case EXTVARS_TYPE_NIL:    lua_pushnil(     L)                      ; break;
     default:                  RETURN_ERROR_STRING( "Unknown ExtVars type"); // TODO get_release leak
     }
     if( ctx->get_release) ctx->get_release( ctx->user_ctx, var, & value, & type);
Comment 2 Benjamin Cabé CLA 2013-05-16 10:42:38 EDT
setting iplog flag to reflect Gilles' contribution in comment #0
Comment 3 Romain Perier CLA 2013-05-16 10:43:57 EDT
*** Bug 406520 has been marked as a duplicate of this bug. ***