<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
<div dir="auto">
<div dir="auto"><br></div><div dir='auto'><br></div>
<div id="aqm-original" style="color: black;">
<!-- body start -->
<div class="aqm-original-body">
<div style="color: black;">
<p style="color: black; font-size: 10pt; font-family: sans-serif; margin: 8pt 0;">On 11 May 2020 14:46:55 George Joseph <gjoseph@digium.com> wrote:</p>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;">
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 9, 2020 at 3:50 PM roger <<a href="mailto:roger@beardandsandals.co.uk">roger@beardandsandals.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I am debugging a problem witj ipv6 and endpoints. I would like to be <br>
able to examine a  particular named endpoint when a breakpnt has been <br>
hit. So basically I need a single line of c code that calls a function <br>
(or nested functions) that take a endpoint name as a parameter and <br>
returns a pointer thta I can use in gdb print command.<br>
<br>
Any ideas gratefully received.<br>
<br></blockquote><div><br></div><div><span style="font-family: monospace;">(gdb) </span>p *(struct ast_sip_endpoint *)ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", "1172")</div><div><br></div><div><span style="font-family: arial, sans-serif;">or to save it to a variable...</span></div><div><span style="font-family: monospace;"><br></span></div><div><span style="font-family: monospace;">set $my_endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", "1172")<br>(gdb) p *(struct ast_sip_endpoint *)$my_endpoint<br></span></div><div><span style="font-family: monospace;"><br></span></div><div><span style="font-family: monospace;"><br></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Roger<br>
<br>
<br>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px"><div style="font-family:tahoma,sans-serif;font-size:small"><span style="color:rgb(7,55,99)">George Joseph</span><br></div></div><div dir="ltr" style="font-size:small"></div><div style="font-family:tahoma,sans-serif;font-size:small"><span style="color:rgb(7,55,99)">Asterisk Software Developer</span><br></div><span style="color:rgb(7,55,99);font-family:tahoma,sans-serif;font-size:small">direct/fax +1 256 428 6012</span><br><div style="font-family:tahoma,sans-serif;font-size:small"><span style="color: #073763;">Check us out at</span> <a href="http://www.sangoma.com/" style="color:rgb(17,85,204)" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a><br></div><div style="font-family:tahoma,sans-serif;font-size:small"><img src="cid:part870.172085b6960.27a5.d4b3b9aee17a85f6bc878c68b3925db6@beardandsandals.co.uk" alt="image.png" width="184" height="32" style="margin-right: 0px;"></div></div></div></div></div></div></div></div></div>

<div>-- </div>
<div>_____________________________________________________________________</div>
<div>-- Bandwidth and Colocation Provided by <a class="aqm-autolink aqm-autowrap" href="http://www.api-digital.com">http://www.api-digital.com</a> --</div>
<div><br></div>
<div>asterisk-dev mailing list</div>
<div>To UNSUBSCRIBE or update options visit:</div>
<div>   <a class="aqm-autolink aqm-autowrap" href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></div>
</blockquote>
</div>
</div>
<!-- body end -->

</div><div dir="auto">Thanks George,</div><div dir="auto"><br></div><div dir="auto">That saved me a shed load of time looking through code.</div><div dir="auto"><br></div><div dir="auto">Roger</div>
</div></body>
</html>