Skip to content

Commit

Permalink
Fixed bug calling set/get accessors.
Browse files Browse the repository at this point in the history
Get accessors were returning false.
setInt64Property should have been setInt64Property
  • Loading branch information
nmoinvaz committed Aug 16, 2024
1 parent 75cd1a4 commit fc004f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ bool Simple_Invoke(void *SimpleContext, echandle MethodDictionaryHandle, echandl

SimpleStruct *Simple = (SimpleStruct *)SimpleContext;
echandle ItemHandle = NULL;
int32_t RetVal = false;
int32_t RetVal = true;
int32_t ReturnValue = false;
const char *Method = NULL;

if (IDictionary_GetStringPtrByKey(MethodDictionaryHandle, "method", &Method) == false)
return false;

if (strcmp(Method, "setInt64Property") == 0) {
if (strcmp(Method, "setIntProperty") == 0) {
int64_t Value64 = 0;
RetVal = IDictionary_GetInt64ByKey(MethodDictionaryHandle, "value", &Value64);
if (RetVal == true)
Expand Down Expand Up @@ -217,6 +217,8 @@ bool Simple_Invoke(void *SimpleContext, echandle MethodDictionaryHandle, echandl
} else if (strcmp(Method, "startValueRequest") == 0) {
RetVal = Simple_StartValueRequest(Simple);
IDictionary_AddInt(ReturnDictionaryHandle, "returnValue", RetVal, &ItemHandle);
} else {
RetVal = false;
}

return RetVal;
Expand Down

0 comments on commit fc004f5

Please sign in to comment.