[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unreported errors



If a transport agent returns an error message with no text, like
11191/101/error

the message is dropped on the floor, with no report to the user.

Here is a patch to scheduler/update.c to fix:

*** 1.1	1993/08/18 20:26:55
--- update.c	1993/08/18 20:27:54
***************
*** 563,578 ****
  	if ((vp = findvertex(inum, offset, &index)) == NULL)
  		return 0;
  	vp->attempts += 1;
! 	if (message != NULL) {
! 		(void)fprintf(stderr,
! 			"%s: %d/%d/error %s\n",
! 			vp->ce.command, inum, offset, message);
! 		msgerror(vp, offset, message);
! 	}
  	if (vp->cfp->vfp != NULL && vp->cfp->contents != NULL) {
  		fprintf(vp->cfp->vfp, "%s: error %s\n",
! 				      vp->cfp->contents + offset + 2,
! 				      message == NULL ? "(unknown)" : message);
  	}
  	vtxupdate(vp, index);
  	return 1;
--- 563,577 ----
  	if ((vp = findvertex(inum, offset, &index)) == NULL)
  		return 0;
  	vp->attempts += 1;
! 	if (message == NULL)
! 		message = "(unknown);
! 	(void)fprintf(stderr,
! 		"%s: %d/%d/error %s\n",
! 		vp->ce.command, inum, offset, message);
! 	msgerror(vp, offset, message);
  	if (vp->cfp->vfp != NULL && vp->cfp->contents != NULL) {
  		fprintf(vp->cfp->vfp, "%s: error %s\n",
! 				      vp->cfp->contents + offset + 2, message);
  	}
  	vtxupdate(vp, index);
  	return 1;