Fix to 6880. xpt_link now prints an informative error message when it encounters duplicate interface names with different iids.

This commit is contained in:
mccabe%netscape.com 1999-05-27 11:02:05 +00:00
Родитель 6959ce1c7c
Коммит 4e4736c3c7
1 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@ -294,7 +294,8 @@ main(int argc, char **argv)
trueNumberOfInterfaces--;
} else {
if (!IDE_array[i].interface_descriptor ||
(compare_IIDs(&IDE_array[i-1].iid, &IDE_array[i].iid) == 0)) {
(compare_IIDs(&IDE_array[i-1].iid, &IDE_array[i].iid) == 0))
{
/* Shrink the IDE_array to delete the duplicate interface.
*/
if (!shrink_IDE_array(IDE_array,
@ -315,9 +316,21 @@ main(int argc, char **argv)
* this loop.
*/
trueNumberOfInterfaces--;
} else {
/* Found interfaces with duplicate names but different
* iids! */
char *ns = IDE_array[i].name_space;
fprintf(stderr,
"ERROR: found duplicate definitions of interface "
"%s%s%s with iids \n",
ns ? ns : "", ns ? "::" : "", IDE_array[i].name);
print_IID(&IDE_array[i].iid, stderr);
fprintf(stderr, " and ");
print_IID(&IDE_array[i-1].iid, stderr);
fprintf(stderr, "\n");
return 1;
}
}
} else {
/* Only increment if there was no name_space::name collision.
*/