summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctm
diff options
context:
space:
mode:
authorgpalmer <gpalmer@FreeBSD.org>1996-07-12 13:12:46 +0000
committergpalmer <gpalmer@FreeBSD.org>1996-07-12 13:12:46 +0000
commit7bfb0c69d91e78adbe259094b5d9b8b4e5bd1103 (patch)
treeddb53e653e07989df22eac3b352436a05dc0602a /usr.sbin/ctm
parent6bcff2b56de93ea390d6759af94cb552a1c8c774 (diff)
downloadFreeBSD-src-7bfb0c69d91e78adbe259094b5d9b8b4e5bd1103.zip
FreeBSD-src-7bfb0c69d91e78adbe259094b5d9b8b4e5bd1103.tar.gz
Small changes so that this actually stands a chance of doing the
right thing...
Diffstat (limited to 'usr.sbin/ctm')
-rw-r--r--usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c b/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c
index 9d10fc5..a3faf27 100644
--- a/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c
+++ b/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: ctm_dequeue.c,v 1.1 1996/07/01 20:53:55 gpalmer Exp $
*/
/*
@@ -116,7 +116,7 @@ main(int argc, char **argv)
while(((!ISFILE) || (IGNORE)) && (HASNEXT))
ftsent = ftsent->fts_link;
- if ((!ISFILE) || (IGNORE) || (!HASNEXT))
+ if ((!ISFILE) || (IGNORE))
{
err("No more chunks to mail");
exit(0);
@@ -159,12 +159,21 @@ main(int argc, char **argv)
munmap(buffer, ftsent->fts_statp->st_size);
close(fp);
+
+ if (unlink(filename) < 0)
+ {
+ err("unlink of `%s' failed", filename);
+ exit(1);
+ }
err("sent file `%s'", ftsent->fts_name);
if (ftsent->fts_link != NULL)
ftsent = ftsent->fts_link;
+ else
+ break;
}
+
err("exiting normally");
return(0);
}
OpenPOWER on IntegriCloud