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 Subject: Re: PMCOM To: djgpp AT delorie DOT com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Precedence: bulk --- Brian Inglis 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/