<div dir="ltr">Hi,<div><br></div><div>I'm currently trying out sd-bus methods for my application. I am in a situation where I must accept an input and return a byte array based on the input. </div><div><br></div><div>In the vtable. the following declaration is present:</div><div>SD_BUS_METHOD("method_id", "x", "ay", method_1, 0)</div><div><br></div><div>And inside the definition for method_1, for returning:</div><div><span style="color:rgb(1,1,129);font-family:"Courier New",monospace;font-size:10pt">uint8_t b[2] = {0x01, 0x02};</span></div><div><span style="color:rgb(1,1,129);font-family:"Courier New",monospace;font-size:10pt">sd_bus_reply_method_return(m, "ay", b);</span></div><div><br></div><div>This is giving me a segmentation error when I invoke method_1 using busctl. I don't think this is the right way I should be returning an array type from a method. </div><div><br></div><div>I am not able to find a reference code / documentation for implementing such methods. Can someone please help me with the right way to do this?</div><div><br></div><div>Thanks,</div><div>Guhan   </div></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid #d3d4de">
        <tr>
        <td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
                <td style="width:470px;padding-top:12px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link" target="_blank" style="color:#4453ea">www.avast.com</a>
                </td>
        </tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>