www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/07/09:07:24

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Message-ID: <20020107140652.52216.qmail@web9101.mail.yahoo.com>
Date: Mon, 7 Jan 2002 06:06:52 -0800 (PST)
From: ROLAND <roland_asmann AT yahoo DOT com>
Subject: Re: PMCOM
To: djgpp AT delorie DOT com
In-Reply-To: <mkg73u46pcd4kdfeb3r0aoln4u4re94gf4@4ax.com>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--- 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019