aboutsummaryrefslogtreecommitdiff
path: root/mpiosh
diff options
context:
space:
mode:
authorgermeier <germeier>2002-09-19 21:25:07 +0000
committergermeier <germeier>2002-09-19 21:25:07 +0000
commitcf208d020339d2c0e755d6de1a5b312328908a4e (patch)
tree8776f73ed08a3766e4ff4c37f2a2792a6c8c1c5a /mpiosh
parent7d92b803c4808c6e5c7e43f064e532eaf0ec0fbd (diff)
downloadmpiosh-cf208d020339d2c0e755d6de1a5b312328908a4e.tar.gz
mpiosh-cf208d020339d2c0e755d6de1a5b312328908a4e.tar.bz2
mpiosh-cf208d020339d2c0e755d6de1a5b312328908a4e.zip
fixed handling of an abort
fixed buggy define
Diffstat (limited to 'mpiosh')
-rw-r--r--mpiosh/callback.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mpiosh/callback.c b/mpiosh/callback.c
index 814059a..ec929dc 100644
--- a/mpiosh/callback.c
+++ b/mpiosh/callback.c
@@ -2,7 +2,7 @@
*
* Author: Andreas Bsching <crunchy@tzi.de>
*
- * $Id: callback.c,v 1.13 2002/09/19 21:19:02 crunchy Exp $
+ * $Id: callback.c,v 1.14 2002/09/19 21:25:07 germeier Exp $
*
* Copyright (C) 2001 Andreas Bsching <crunchy@tzi.de>
*
@@ -280,7 +280,7 @@ mpiosh_cmd_mget(char *args[])
debugn (2, "error in regular expression: %s (%s)\n", args[i], errortext);
} else {
p = mpio_directory_open(mpiosh.dev, mpiosh.card);
- while (p != NULL) {
+ while ((p != NULL) ) {
memset(fname, '\0', 100);
mpio_dentry_get(mpiosh.dev, mpiosh.card, p, fname, 100,
&year, &month, &day, &hour, &minute, &fsize);
@@ -358,7 +358,7 @@ mpiosh_cmd_mput(char *args[])
} else {
if ((size = scandir(dir_buf, &dentry, NULL, alphasort)) != -1) {
run = dentry;
- for (j = 0; j < size; j++, run++) {
+ for (j = 0; ((j < size) && (!mpiosh_cancel)); j++, run++) {
if (!(error = regexec(&regex, (*run)->d_name, 0, NULL, 0))) {
printf("putting '%s' ... \n", (*run)->d_name);
if (mpio_file_put(mpiosh.dev, mpiosh.card,
@@ -438,7 +438,7 @@ mpiosh_cmd_mdel(char *args[])
debugn (2, "error in regular expression: %s (%s)\n", args[i], errortext);
} else {
p = mpio_directory_open(mpiosh.dev, mpiosh.card);
- while (p != NULL) {
+ while ((p != NULL) && (!mpiosh_cancel)) {
memset(fname, '\0', 100);
mpio_dentry_get(mpiosh.dev, mpiosh.card, p, fname, 100,
&year, &month, &day, &hour, &minute, &fsize);
@@ -487,7 +487,7 @@ mpiosh_cmd_dump(char *args[])
arg[1] = NULL;
p = mpio_directory_open(mpiosh.dev, mpiosh.card);
- while (p != NULL) {
+ while ((p != NULL) && (!mpiosh_cancel)) {
memset(fname, '\0', 256);
mpio_dentry_get(mpiosh.dev, mpiosh.card, p,