AW: [En-Nut-Discussion] Problems with NutTcpReceive

markusklemt at gmx.de markusklemt at gmx.de
Wed Nov 16 23:02:47 CET 2005


Hi,

thanks for the answer,
I have solve the problem, I use for the NutTcpReceive function an new
thread.

It works.

Markus

-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de]Im Auftrag von Ernst Stippl
Gesendet: Mittwoch, 16. November 2005 22:25
An: 'Ethernut User Chat (English)'
Betreff: AW: [En-Nut-Discussion] Problems with NutTcpReceive


Hi Markus!

I am not especially good at C, but try

if (( data = NutTcpReceive(sock,in_data,sizeof(in_data)-1))!= 0)

instead of

if ( data = NutTcpReceive(sock,in_data,sizeof(in_data)-1)!= 0)

Do you recognize the additional braces? Maybe they influence the sequence in
which the statemant is executed.

regards
Ernst

-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von
markusklemt at gmx.de
Gesendet: Dienstag, 15. November 2005 21:11
An: en-nut-discussion at egnite.de
Betreff: [En-Nut-Discussion] Problems with NutTcpReceive

Hi, I am from germany my english isn´t so good

I have Problems withe the function " NutTcpReceive" or "NutTcpDeviceRead"

I have in my program a while loop.
I ask, have the PIND changed
and then I ask,

if ( data = NutTcpReceive(sock,in_data,sizeof(in_data)-1)!= 0)
  {
	if (in_data == ....)
		{
			do anything;
		}
	if (in_data == ....)
	{
			do anything
	}

	}

The while loop works, but ist stops at the function ---- if ( data =
NutTcpReceive(sock,in_data,sizeof(in_data)-1)!= 0)----

if I receive an String on "sock" the loop does work one times more and stops
at the same position again and again.

Can someone help me?

Thanks

Markus






_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion

_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list