projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'upstream/3.3.3'
[debian/amanda]
/
common-src
/
amservice.c
diff --git
a/common-src/amservice.c
b/common-src/amservice.c
index b5346a128c5391450abf6dc3bccf366e54285f1c..8b8c50aaa86835ede40f05013f585cf8bdc5c724 100644
(file)
--- a/
common-src/amservice.c
+++ b/
common-src/amservice.c
@@
-1,6
+1,7
@@
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-2000 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
@@
-321,18
+322,17
@@
read_in(
void *cookie G_GNUC_UNUSED)
{
size_t nread;
void *cookie G_GNUC_UNUSED)
{
size_t nread;
- char buf[102
4
];
+ char buf[102
5
];
- event_release(event_in);
nread = read(0, buf, 1024);
nread = read(0, buf, 1024);
- if (nread == 0) {
+ if (nread <= 0) {
+ event_release(event_in);
security_stream_close(fd);
return;
}
buf[nread] = '\0';
security_stream_write(fd, buf, nread);
security_stream_close(fd);
return;
}
buf[nread] = '\0';
security_stream_write(fd, buf, nread);
- event_in = event_register((event_id_t)0, EV_READFD, read_in, NULL);
}
static void
}
static void
@@
-351,7
+351,6
@@
read_server(
if (errno > 0) {
g_debug("failed to write to stdout: %s", strerror(errno));
}
if (errno > 0) {
g_debug("failed to write to stdout: %s", strerror(errno));
}
- security_stream_read(fd, read_server, NULL);
break;
}
}
break;
}
}