X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afs.c;h=ac7884c7e4e4c959a3ce3b1c17d050705a70b394;hp=e84d9a8839a14b5ec7267b62f2c5065414863276;hb=f0380a05616524b149fa34f4a0873d9063ca2a95;hpb=5c556c52f1196cea4536d36b683372de532943a9 diff --git a/afs.c b/afs.c index e84d9a88..ac7884c7 100644 --- a/afs.c +++ b/afs.c @@ -164,7 +164,6 @@ int send_callback_request(callback_function *f, struct osl_object *query, int ret, fd = -1, query_shmid, result_shmid; void *query_shm, *result_shm; char buf[sizeof(afs_socket_cookie) + sizeof(int)]; - struct sockaddr_un unix_addr; size_t query_shm_size = sizeof(*cq); if (query) @@ -189,16 +188,10 @@ int send_callback_request(callback_function *f, struct osl_object *query, *(uint32_t *) buf = afs_socket_cookie; *(int *) (buf + sizeof(afs_socket_cookie)) = query_shmid; - ret = get_stream_socket(PF_UNIX); + ret = create_remote_socket(conf.afs_socket_arg); if (ret < 0) goto out; fd = ret; - ret = init_unix_addr(&unix_addr, conf.afs_socket_arg); - if (ret < 0) - goto out; - ret = PARA_CONNECT(fd, &unix_addr); - if (ret < 0) - goto out; ret = send_bin_buffer(fd, buf, sizeof(buf)); if (ret < 0) goto out; @@ -206,7 +199,7 @@ int send_callback_request(callback_function *f, struct osl_object *query, if (ret < 0) goto out; if (ret != sizeof(int)) { - ret = -E_RECV; + ret = -E_AFS_SHORT_READ; goto out; } ret = *(int *) buf;