loglevel adjustments.
[paraslash.git] / afs.c
diff --git a/afs.c b/afs.c
index a7778a5..00aab24 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -178,11 +178,9 @@ int send_callback_request(callback_function *f, struct osl_object *query,
        if (connect(fd, (struct sockaddr *)&unix_addr, sizeof(unix_addr)) < 0) /* FIXME: Use para_connect() */
                goto out;
        ret = send_bin_buffer(fd, buf, sizeof(buf));
-       PARA_NOTICE_LOG("bin buffer ret: %d\n", ret);
        if (ret < 0)
                goto out;
        ret = recv_bin_buffer(fd, buf, sizeof(buf));
-       PARA_NOTICE_LOG("ret: %d\n", ret);
        if (ret < 0)
                goto out;
        if (ret != sizeof(int)) {
@@ -190,7 +188,6 @@ int send_callback_request(callback_function *f, struct osl_object *query,
                goto out;
        }
        ret = *(int *) buf;
-       PARA_NOTICE_LOG("result_shmid: %d\n", ret);
        if (ret <= 0)
                goto out;
        result_shmid = ret;
@@ -214,7 +211,7 @@ out:
                PARA_ERROR_LOG("%s\n", "shm destroy error");
        if (fd >= 0)
                close(fd);
-       PARA_DEBUG_LOG("callback_ret: %d\n", ret);
+//     PARA_DEBUG_LOG("callback_ret: %d\n", ret);
        return ret;
 }
 
@@ -673,36 +670,29 @@ static void command_post_select(struct sched *s, struct task *t)
        t->ret = recv_bin_buffer(fd, buf, sizeof(buf));
        if (t->ret < 0) {
                PARA_NOTICE_LOG("%s (%d)\n", PARA_STRERROR(-t->ret), t->ret);
-               t->ret = 1;
                goto out;
        }
        if (t->ret != sizeof(buf)) {
                PARA_NOTICE_LOG("short read (%d bytes, expected %lu)\n",
                        t->ret, (long unsigned) sizeof(buf));
-               t->ret = 1;
                goto out;
        }
        cookie = *(uint32_t *)buf;
        if (cookie != ct->cookie) {
                PARA_NOTICE_LOG("received invalid cookie(got %u, expected %u)\n",
                        (unsigned)cookie, (unsigned)ct->cookie);
-               t->ret = 1;
                goto out;
        }
        query_shmid = *(int *)(buf + sizeof(cookie));
        if (query_shmid < 0) {
                PARA_WARNING_LOG("received invalid query shmid %d)\n",
                        query_shmid);
-               t->ret = 1;
-               goto out;
-       }
-       t->ret = call_callback(fd, query_shmid);
-       if (t->ret < 0) {
-               PARA_NOTICE_LOG("%s\n", PARA_STRERROR(-t->ret));
-               t->ret = 1;
                goto out;
        }
+       /* Ignore return value: Errors might be ok here. */
+       call_callback(fd, query_shmid);
 out:
+       t->ret = 1;
        close(fd);
 }