X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fclient.c;h=7cdfbe33b43971dfc51df123766e5f619cca9c60;hb=cab0b442977697b876127cda082b1262ece2714b;hp=fc2776b7e599fef28654c90f8cee5096e0f68b82;hpb=049aedb6ec90e163d2e0cc51ab66f65d18700a86;p=doldaconnect.git diff --git a/daemon/client.c b/daemon/client.c index fc2776b..7cdfbe3 100644 --- a/daemon/client.c +++ b/daemon/client.c @@ -408,7 +408,7 @@ static void writehashcache(int now) fclose(stream); } -static int hashread(struct socket *sk, void *uudata) +static void hashread(struct socket *sk, void *uudata) { static char *hashbuf; static size_t hashbufsize = 0, hashbufdata = 0; @@ -422,7 +422,7 @@ static int hashread(struct socket *sk, void *uudata) struct hashcache *hc; if((buf = sockgetinbuf(sk, &bufsize)) == NULL) - return(0); + return; bufcat(hashbuf, buf, bufsize); free(buf); while((lp = memchr(hashbuf, '\n', hashbufdata)) != NULL) @@ -464,7 +464,6 @@ static int hashread(struct socket *sk, void *uudata) } memmove(hashbuf, lp, hashbufdata -= (lp - hashbuf)); } - return(0); } static void hashexit(pid_t pid, int status, struct socket *outsock) @@ -543,7 +542,7 @@ static int hashfile(char *path) close(fd); close(pfd[1]); outsock = wrapsock(pfd[0]); - CBREG(outsock, socket_read, hashread, NULL, NULL); + outsock->readcb = hashread; childcallback(hashjob, (void (*)(pid_t, int, void *))hashexit, outsock); return(0); }