Dolda2000 GitWeb
/
doldaconnect.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Slight updates.
[doldaconnect.git]
/
daemon
/
client.c
diff --git
a/daemon/client.c
b/daemon/client.c
index
fc2776b
..
47ac9de
100644
(file)
--- a/
daemon/client.c
+++ b/
daemon/client.c
@@
-60,9
+60,20
@@
static void writehashcache(int now);
static struct configvar myvars[] =
{
static struct configvar myvars[] =
{
+ /** The default nick name to use. The nickname can also be
+ * specified for individual hubs, overriding this setting. */
{CONF_VAR_STRING, "defnick", {.str = L"DoldaConnect user"}},
{CONF_VAR_STRING, "defnick", {.str = L"DoldaConnect user"}},
+ /** When scanning shares, this bitmask is consulted for every
+ * regular file. Unless the file's mode has the bits specified by
+ * this mask set, it will not be shared. */
{CONF_VAR_INT, "scanfilemask", {.num = 0004}},
{CONF_VAR_INT, "scanfilemask", {.num = 0004}},
+ /** When scanning shares, this bitmask is consulted for every
+ * directory encountered. Unless the directory's mode has the bits
+ * specified by this mask set, it will be ignored and any files
+ * under it will not be shared. */
{CONF_VAR_INT, "scandirmask", {.num = 0005}},
{CONF_VAR_INT, "scandirmask", {.num = 0005}},
+ /** The filename to use for the hash cache (see the FILES section
+ * for more information). */
{CONF_VAR_STRING, "hashcache", {.str = L"dc-hashcache"}},
{CONF_VAR_END}
};
{CONF_VAR_STRING, "hashcache", {.str = L"dc-hashcache"}},
{CONF_VAR_END}
};
@@
-408,7
+419,7
@@
static void writehashcache(int now)
fclose(stream);
}
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;
{
static char *hashbuf;
static size_t hashbufsize = 0, hashbufdata = 0;
@@
-422,7
+433,7
@@
static int hashread(struct socket *sk, void *uudata)
struct hashcache *hc;
if((buf = sockgetinbuf(sk, &bufsize)) == NULL)
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)
bufcat(hashbuf, buf, bufsize);
free(buf);
while((lp = memchr(hashbuf, '\n', hashbufdata)) != NULL)
@@
-464,7
+475,6
@@
static int hashread(struct socket *sk, void *uudata)
}
memmove(hashbuf, lp, hashbufdata -= (lp - hashbuf));
}
}
memmove(hashbuf, lp, hashbufdata -= (lp - hashbuf));
}
- return(0);
}
static void hashexit(pid_t pid, int status, struct socket *outsock)
}
static void hashexit(pid_t pid, int status, struct socket *outsock)
@@
-543,7
+553,7
@@
static int hashfile(char *path)
close(fd);
close(pfd[1]);
outsock = wrapsock(pfd[0]);
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);
}
childcallback(hashjob, (void (*)(pid_t, int, void *))hashexit, outsock);
return(0);
}