<?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: RTCS_geterror()</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-geterror/m-p/215414#M5490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RTCS related error codes are defined in rtcs.h&lt;/P&gt;&lt;P&gt;c:\Freescale\Freescale_MQX_4_0\rtcs\source\include\rtcs.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RTCS_ERROR_BASE is defined in mqx.h 0x1000&lt;/P&gt;&lt;P&gt;c:\Freescale\Freescale_MQX_4_0\mqx\source\include\mqx.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in rtcs.h, for 0x1704 = RTCS_ERROR_BASE | 0x704 = RTCSERR_SOCK_INVALID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems the child_sock is not valid. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Dec 2012 10:19:19 GMT</pubDate>
    <dc:creator>Martin_</dc:creator>
    <dc:date>2012-12-21T10:19:19Z</dc:date>
    <item>
      <title>RTCS_geterror()</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-geterror/m-p/215413#M5489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on a simple TCP server where multiple client will connect to it. The requirement was server will have multiple port and on each port we will connect the client. so a dedicated connection will be establish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the code i have written works fine. but when&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;/* Create a task to look after it */&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; if (RTCS_detachsock(child_sock) == RTCS_OK)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; result = _task_create(0, SERVER_C_TASK_0, child_sock);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; if (result == MQX_NULL_TASK_ID)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; {&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTCS_attachsock(child_sock);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; shutdown(child_sock, FLAG_CLOSE_TX);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\nCould not create server child task.\n\r");&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; }&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;printf("\n accept() failed, error 0x%lx", RTCS_geterror(child_sock));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;on excecution of the underline statement. i see output on terminal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;I'm waiting for connections ...&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Error, accept() failed with error code 1704&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Error, getpeername() failed with error code 1704&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Client 0 is already connected.&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P&gt;now i am not able to decode the error code 1704.&lt;/P&gt;&lt;P&gt;like what exactly it meant. and what action should i take to avoid it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 07:10:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-geterror/m-p/215413#M5489</guid>
      <dc:creator>Swapnil_Enable</dc:creator>
      <dc:date>2012-12-21T07:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: RTCS_geterror()</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-geterror/m-p/215414#M5490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RTCS related error codes are defined in rtcs.h&lt;/P&gt;&lt;P&gt;c:\Freescale\Freescale_MQX_4_0\rtcs\source\include\rtcs.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RTCS_ERROR_BASE is defined in mqx.h 0x1000&lt;/P&gt;&lt;P&gt;c:\Freescale\Freescale_MQX_4_0\mqx\source\include\mqx.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in rtcs.h, for 0x1704 = RTCS_ERROR_BASE | 0x704 = RTCSERR_SOCK_INVALID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems the child_sock is not valid. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 10:19:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-geterror/m-p/215414#M5490</guid>
      <dc:creator>Martin_</dc:creator>
      <dc:date>2012-12-21T10:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: RTCS_geterror()</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-geterror/m-p/215415#M5491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Martin, this information is very useful....thanks again...&lt;/P&gt;&lt;P&gt;:smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 10:29:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-geterror/m-p/215415#M5491</guid>
      <dc:creator>Swapnil_Enable</dc:creator>
      <dc:date>2012-12-21T10:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: RTCS_geterror()</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-geterror/m-p/215416#M5492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the error decoding, i figure out that the sockets i initialized while initializing the network was lower than what i was using....increasing the socket has solved the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 11:05:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-geterror/m-p/215416#M5492</guid>
      <dc:creator>Swapnil_Enable</dc:creator>
      <dc:date>2012-12-24T11:05:55Z</dc:date>
    </item>
  </channel>
</rss>

