RSIM Bug Report #19

Version of RSIM1.0
Bug number19
Bug class2
Date6/11/99
Reported byJeff Bradford, Purdue
AffectsCode that stresses directory output port buffers
Filesdirectory.c

Problem Description

There are a few output-port full cases in the directory that are not properly handled. Fortunately, there are just a few one-line fixes.

Problem Fix

In one place of the code that says: req=dirptr->req_partial; /* take that instead */ the dirptr->req field is not setup properly for later use. Change this line to: dirptr->req=req=dirptr->req_partial; /* take that instead */ Then, there are multiple places in the directory.c code that look as follows: if (!add_req(dirptr->out_port_ptr[oport_num],XXX)) { YS__errmsg("YYY"); } (where XXX and YYY vary across the instances in the code). These checks are redundant and actually harmful, since add_req can legally return a 0 value. These should be replaced with: add_req(dirptr->out_port_ptr[oport_num],XXX); That is, no if conditional should be involved to check the add_req return value, and there should be no use of the YS__errmsg function based on the return value of add_req.