aboutsummaryrefslogtreecommitdiff
path: root/aufgabe3/log.c
diff options
context:
space:
mode:
authorThorsten Töpper <atsutane@freethoughts.de>2011-01-03 02:39:29 +0100
committerThorsten Töpper <atsutane@freethoughts.de>2011-01-03 02:39:29 +0100
commit3bc36622e01fae96154f1d63cfa94748538d6e59 (patch)
tree50eee91518cfe0c54fc2104a3664c642d9d5f2d2 /aufgabe3/log.c
parent89f32cb9767074cd9ab01d8bcc4b164a4f3ac83d (diff)
downloadprozesskommunikation-3bc36622e01fae96154f1d63cfa94748538d6e59.tar.gz
prozesskommunikation-3bc36622e01fae96154f1d63cfa94748538d6e59.tar.bz2
Aufgabe 3: monitor implementiert, log.c korrigiert.
Diffstat (limited to 'aufgabe3/log.c')
-rw-r--r--aufgabe3/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/aufgabe3/log.c b/aufgabe3/log.c
index d38adfd..88a394d 100644
--- a/aufgabe3/log.c
+++ b/aufgabe3/log.c
@@ -17,7 +17,7 @@ void logmsg() {
/* Message Queue zur Kommunikation mit dem conv Prozess öffnen.
*/
- if ((log = mq_open(MQ_TO_LOG, O_RDWR)) == -1) {
+ if ((log = mq_open(MQ_TO_LOG, O_RDONLY)) == -1) {
perror("logmsg() mq_open");
exit(EXIT_FAILURE);
}
@@ -31,7 +31,7 @@ void logmsg() {
/*
* Speicher für Nachricht allokieren.
*/
- if ((message = calloc(1, MQ_MSG_SIZE_SEND)) == NULL) {
+ if ((message = calloc(1, MQ_MSG_SIZE_RCV)) == NULL) {
perror("logmsg()");
exit(EXIT_FAILURE);
}