Sent invoke method parameters from client(wsmnacli) to provider

Bug ID:265
Project:Openwsman
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Dear all :
I had spend lot of time to trace the sourcecode.
I found the problem is sfcc-interface.c. When using cim_add_args method,

while ((hn = hash_scan_next(&hs))) {

CMAddArg(argsin, (char *) hnode_getkey(hn),
(char *) hnode_get(hn), CMPI_chars);
}

hnode_get(hn) ===> return a selector_entry struct
but i think it require a string, so i change the code to this

selector_entry *in;
char *cmdstring=NULL;
while ((hn = hash_scan_next(&hs))) {
in=hnode_get(hn);//fran add 080910
cmdstring=calloc(1,(strlen(in->entry.text))+1);//fran add 080910
strcpy(cmdstring,in->entry.text);//fran add 080910
CMAddArg(argsin, (char *) hnode_getkey(hn),
cmdstring, CMPI_chars);
}
if(cmdstring) free(cmdstring);

Then the parameter from wsmancli can be send to the provider, and it's works.

Am i find it a bug??

My client command is

wsman invoke -a execCmd -k cmd=ps -h localhost -P 8889 -u wsman -p secret -y basic -u wsman -p secret -y basic http://sblim.sf.net/wbem/wscim/1/cim-schema/2/Linux_OperatingSystem

After change the code, the value( ps ) is receive by OperatingSystemProvider OSBase_OperatingSystemProviderInvokeMethod
incmd = CMGetArg( in, "cmd", &rc);
incmd.value.string=ps