<html><head></head><body><div class="ydp710c4ff4yahoo-style-wrap" style="font-family: lucida console, sans-serif; font-size: 16px;"><div><div dir="ltr" data-setdir="false">Added few syslog messages in proxy.h </div><div dir="ltr" data-setdir="false"><div><div> ::DBus::MessageIter ri = ret.reader();</div><div> syslog(LOG_CRIT, "DONE getting reader");</div><div><br></div><div> ::DBus::Struct< int32_t, std::string > argout;</div><div> syslog(LOG_CRIT, "read output");</div><div> ri >> argout;</div><div> syslog(LOG_CRIT, "DONE read output");</div><div><br></div></div><br><br>I see that it crashes at this line:</div><div dir="ltr" data-setdir="false"><div><div style="color: rgb(0, 0, 0); font-family: lucida console, sans-serif; font-size: 16px;"> ri >> argout;</div><div><br></div></div><div dir="ltr" data-setdir="false"><br></div>How do I dump the MessageIterator?<br><br>My host module (dbus server) is in python and returns <br><div><div>class KeyHandler(host_service.HostModule):</div><div> @host_service.method(host_service.bus_name(MOD_NAME), in_signature='as', out_signature='is')</div><div> def key_ctl(self, options):<br> :<br> :</div></div><div dir="ltr" data-setdir="false"> </div><div dir="ltr" data-setdir="false"> return err, output<div><div><br></div></div></div><div dir="ltr" data-setdir="false"><br></div>The interface is <br><div><div> <interface name="org.SONiC.HostService.keyhandler"></div><div> <method name="key_ctl"></div><div> <arg direction="in" type="as" name="data"/> <!-- Must be a list of strings --></div><div> <arg direction="out" type="(is)" name="(success, output)"/> <!-- output --></div><div> </method></div><div> </interface></div><div><br></div></div><br>And the proxy header is as below.</div><div dir="ltr" data-setdir="false"> <br></div><div dir="ltr" data-setdir="false"><div><div> ::DBus::Struct< int32_t, std::string > key_ctl(const std::vector< std::string >& data)</div><div><br></div></div><br></div><div dir="ltr" data-setdir="false">It expects a struct of int32_t and a string.<br><br>Is there something I am missing what the server in python is sending and what client in c++ is expecting to receive?<br><br>Is tehre a way to dump the iterator? </div><div><br></div><div class="ydp710c4ff4signature"><div style="font-family:sans-serif;font-size:16px;"><div style="font-family:sans-serif;font-size:16px;" dir="ltr"><span><span style="color:rgb(0, 0, 0);font-family:sans-serif;font-size:16px;">~~ Thanks, Srinadh</span></span><br></div><div style="font-family:sans-serif;font-size:16px;" dir="ltr"><br></div><div style="font-family:sans-serif;font-size:16px;"><div><br></div><div><br></div></div></div></div></div>
<div><br></div><div><br></div>
</div><div id="ydp570b6deeyahoo_quoted_3758529247" class="ydp570b6deeyahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Tuesday, September 28, 2021, 09:12:56 PM PDT, Lawrence D'Oliveiro <ldo@geek-central.gen.nz> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">On Wed, 29 Sep 2021 03:14:32 +0000 (UTC), Srinadh Penugonda wrote:<div class="ydp570b6deeyqt7025530648" id="ydp570b6deeyqtfd00166"><br clear="none"><br clear="none">> Thats what I suspect too but I could not understand what is the issue.</div><br clear="none"><br clear="none">Stick some debugs in it and find out!<div class="ydp570b6deeyqt7025530648" id="ydp570b6deeyqtfd07036"><br clear="none"></div></div></div>
</div>
</div></body></html>