Mail Archives: djgpp/2002/01/07/09:07:24
--- Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
wrote:
> You're calling something which normally returns a
> valid pointer,
> but returns -1 when there is an error, and you are
> not checking
> for -1 as an error return value: you may be assuming
> that NULL is
> returned on an error.
> This is not always the case, especially when dealing
> with system
> calls.
> If you are already checking for NULL, add a check
> for || ? == -1
> and print out some debugging info for both error
> cases, to see if
> there is a difference in symtoms.
>
> Thanks. Take care, Brian Inglis Calgary, Alberta,
> Canada
This does not seem to be the problem!
Everything is working correct, but the program just
crashes after X times of reading the RX-buffer.
The thing my program does, is send data over the
COM-port and then read it for a ACK/NACK package.
It waits with sending a new package until an ACK/NACK
has been received.
When I do not connect the two devices to each other,
the program would have to run forever (or so I
thought), but for some reason it crashes after having
read de RX buffer X times...
The stranged thing is that X is not always the same
number, but differs from one run to another...
Does anybody know where this problem could be coming
from?
Or is it just impossible to read the RX-buffer over
and over again while it's empty??
Roland
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
- Raw text -