<?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>topic Re: telnet server creating PART: out of blocks error in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/telnet-server-creating-PART-out-of-blocks-error/m-p/197820#M4225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Every time you cycle through the loop you are executing the following&amp;nbsp;:&amp;nbsp;_task_create(0,TELNET_CONNECTION,sock);&lt;/P&gt;&lt;P&gt;You will eventually run out of memory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2012 23:35:14 GMT</pubDate>
    <dc:creator>boogy</dc:creator>
    <dc:date>2012-01-17T23:35:14Z</dc:date>
    <item>
      <title>telnet server creating PART: out of blocks error</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/telnet-server-creating-PART-out-of-blocks-error/m-p/197819#M4224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have made a simple telnet server that accepts a connection and sends the stream socket to a new thread. It works great with one connection but the second will accept the connection and then die.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I pause the program and look at the server task summary it show PART: Out of Blocks error. Does anyone know what this and how do I fix it? I am not doing any partitioning myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;* telnet_server.c&lt;BR /&gt;*&lt;BR /&gt;* Created on: Jan 11, 2012&lt;BR /&gt;* Author: Doug Nappier&lt;BR /&gt;*/&lt;/P&gt;&lt;P&gt;#include "telnet_server.h"&lt;/P&gt;&lt;P&gt;void telnet_server(uint_8 parameters)&lt;BR /&gt;{&lt;BR /&gt;uint_32 sock,listensock;&lt;BR /&gt;sockaddr_in blue_box_addr;&lt;BR /&gt;uint_32 error = 256;&lt;BR /&gt;char str[] = "\n Connected to Blue Box \n";&lt;BR /&gt;&lt;BR /&gt;listensock = socket(PF_INET, SOCK_STREAM, 0);&lt;BR /&gt;setsockopt(listensock, SOL_TCP, OPT_TBSIZE, &amp;amp;error, sizeof(error));&lt;BR /&gt;setsockopt(listensock, SOL_TCP, OPT_RBSIZE, &amp;amp;error, sizeof(error));&lt;BR /&gt;error = 1000;&lt;/P&gt;&lt;P&gt;setsockopt(listensock, SOL_TCP, OPT_TIMEWAIT_TIMEOUT, &amp;amp;error, sizeof(error));&lt;/P&gt;&lt;P&gt;blue_box_addr.sin_family = AF_INET;&lt;BR /&gt;blue_box_addr.sin_port = IPPORT_TELNET;&lt;BR /&gt;blue_box_addr.sin_addr.s_addr = INADDR_ANY;&lt;BR /&gt;tel = 0;&lt;BR /&gt;error = bind(listensock, &amp;amp;blue_box_addr, sizeof(blue_box_addr));&lt;BR /&gt;&lt;BR /&gt;error = listen(listensock, 0);&lt;BR /&gt;while(TRUE)&lt;BR /&gt;{&lt;BR /&gt;sock = accept(listensock, NULL, NULL);&lt;BR /&gt;if(sock != RTCS_SOCKET_ERROR){&lt;BR /&gt;++telnet_count;&lt;BR /&gt;printf("\n\rConnection made %d\n\r",telnet_count);&lt;BR /&gt;send(sock,str,sizeof(str)-1,0);&lt;BR /&gt;_task_create(0,TELNET_CONNECTION,sock);&lt;BR /&gt;}&lt;BR /&gt;else printf("\r\nsocket error\r\n");&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jan 2012 07:40:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/telnet-server-creating-PART-out-of-blocks-error/m-p/197819#M4224</guid>
      <dc:creator>dnappier</dc:creator>
      <dc:date>2012-01-14T07:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: telnet server creating PART: out of blocks error</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/telnet-server-creating-PART-out-of-blocks-error/m-p/197820#M4225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Every time you cycle through the loop you are executing the following&amp;nbsp;:&amp;nbsp;_task_create(0,TELNET_CONNECTION,sock);&lt;/P&gt;&lt;P&gt;You will eventually run out of memory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 23:35:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/telnet-server-creating-PART-out-of-blocks-error/m-p/197820#M4225</guid>
      <dc:creator>boogy</dc:creator>
      <dc:date>2012-01-17T23:35:14Z</dc:date>
    </item>
  </channel>
</rss>

