X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afs.c;h=00aab24b745e16eb95cfeead62d4a4a2cdd7e867;hp=a7778a5854ce782221cc7090b09eaa1a07e62049;hb=4a262fc2d915538dd5ebaa58fa5ec7403de650cd;hpb=32c51e5eef9085285cc4ec4f4d713edb2fab9ac0 diff --git a/afs.c b/afs.c index a7778a58..00aab24b 100644 --- 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); }