From 3bc36622e01fae96154f1d63cfa94748538d6e59 Mon Sep 17 00:00:00 2001 From: Thorsten Töpper Date: Mon, 3 Jan 2011 02:39:29 +0100 Subject: Aufgabe 3: monitor implementiert, log.c korrigiert. --- aufgabe3/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'aufgabe3/log.c') 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); } -- cgit v1.2.3-70-g09d2