<p style="white-space: pre-wrap; word-wrap: break-word;">I agree with Josh.  If you use strsep to parse the list of codes and store them in an ast_vector_int you can easily handle multiple codes.  There are lots of examples elsewhere in the Asterisk codebase.<br></p><p>Patch set 2:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15066">View Change</a></p><p>7 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15066/2/configs/samples/res_curl.conf.sample">File configs/samples/res_curl.conf.sample:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15066/2/configs/samples/res_curl.conf.sample@9">Patch Set #2, Line 9:</a> <code style="font-family:monospace,monospace">;failurecode</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Should be plural "failurecodes"</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15066/2/funcs/func_curl.c">File funcs/func_curl.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15066/2/funcs/func_curl.c@190">Patch Set #2, Line 190:</a> <code style="font-family:monospace,monospace">failurecode</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Should be plural "failurecodes"</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15066/2/funcs/func_curl.c@191">Patch Set #2, Line 191:</a> <code style="font-family:monospace,monospace">Interrupt based on specific http real curl error</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">"A comma separated list of HTTP response codes to be treated as errors"</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15066/2/funcs/func_curl.c@326">Patch Set #2, Line 326:</a> <code style="font-family:monospace,monospace">failurecode</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">failurecodes</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15066/2/funcs/func_curl.c@328">Patch Set #2, Line 328:</a> <code style="font-family:monospace,monospace">OT_INTEGER</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">OT_STRING</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15066/2/funcs/func_curl.c@668">Patch Set #2, Line 668:</a> <code style="font-family:monospace,monospace">long hasfailurecode=0</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">If you make this an ast_vector_int you can easily use strsep to parse the comma separated list of error codes and add them to the vector, then when you get a response it's only a few lines of code to test each element in the vector.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15066/2/funcs/func_curl.c@905">Patch Set #2, Line 905:</a> <code style="font-family:monospace,monospace">"  failurecode    - Interrupt based on specific http error code(integer)\n"</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This line should be below the following line.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15066">change 15066</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/15066"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I94443e508343e0a3e535e51ea6e0562767639987 </div>
<div style="display:none"> Gerrit-Change-Number: 15066 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Dovid Bender <dovid@telecurve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 28 Oct 2020 12:55:28 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>