<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MQX Software Solutions中的主题 Re: Open a file in cgi call back function cause overflow?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277246#M8631</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Well, the memory is finite. So, you shall use the Task Aware Debugging to see how much memory is left in the HTTP server stack. This is not a dynamic memory allocation so you need to calculate well and assign what you think it is going to be enough. A try and test method could work. It is not the best approach but at least will give a good result.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Garabo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Feb 2014 18:59:33 GMT</pubDate>
    <dc:creator>Luis_Garabo</dc:creator>
    <dc:date>2014-02-07T18:59:33Z</dc:date>
    <item>
      <title>Open a file in cgi call back function cause overflow?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277241#M8626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on httpsrv project, I am try to create my own cgi function. &lt;/P&gt;&lt;P&gt;But when I try to open a file in this cgi function, it cause&lt;/P&gt;&lt;P&gt;"httpsrv callback handler overflow."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas about this? I am use MQX4.0.2 and TWR-K60F120M.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 19:50:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277241#M8626</guid>
      <dc:creator>danielchai</dc:creator>
      <dc:date>2014-02-04T19:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Open a file in cgi call back function cause overflow?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277242#M8627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perhaps you don't have enough stack. When you call the function HTTPSRV_init() you give as parameter the structure HTTPSRV_PARAM_STRUCT. In this structure you have the "script_stack" variable. This variable is the size of a stack of the script handler task in bytes. Try to set the value of this variable according to the memory requirements of your CGI callbacks. The default value is 750 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Garabo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 17:36:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277242#M8627</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2014-02-06T17:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Open a file in cgi call back function cause overflow?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277243#M8628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Garabo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. It solves the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is that when I set script_stack, this is the stack size for each cgi call back function, is it correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 20:28:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277243#M8628</guid>
      <dc:creator>danielchai</dc:creator>
      <dc:date>2014-02-06T20:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Open a file in cgi call back function cause overflow?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277244#M8629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, this is for the http server. That means it should be for all the CGI calls. The stack is taken from here for each one of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Garabo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 22:40:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277244#M8629</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2014-02-06T22:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Open a file in cgi call back function cause overflow?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277245#M8630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Garabo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Then if I want to add more CGI calls, I need keep extending this stack size, otherwise it will cause stack overflow, is it right?&lt;/P&gt;&lt;P&gt;If it is the case, is there a better way to set this stack dynamically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 13:33:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277245#M8630</guid>
      <dc:creator>danielchai</dc:creator>
      <dc:date>2014-02-07T13:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Open a file in cgi call back function cause overflow?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277246#M8631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Well, the memory is finite. So, you shall use the Task Aware Debugging to see how much memory is left in the HTTP server stack. This is not a dynamic memory allocation so you need to calculate well and assign what you think it is going to be enough. A try and test method could work. It is not the best approach but at least will give a good result.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Garabo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 18:59:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277246#M8631</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2014-02-07T18:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Open a file in cgi call back function cause overflow?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277247#M8632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Garabo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 20:36:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Open-a-file-in-cgi-call-back-function-cause-overflow/m-p/277247#M8632</guid>
      <dc:creator>danielchai</dc:creator>
      <dc:date>2014-02-07T20:36:15Z</dc:date>
    </item>
  </channel>
</rss>

