}
serve=g_new0(SERVER, 1);
serve->authname = g_strdup(default_authname);
+ serve->virtstyle=VIRT_IPLIT;
while((c=getopt_long(argc, argv, "-a:C:cl:mo:rp:", long_options, &i))>=0) {
switch (c) {
case 1:
* @param client a connected client
**/
void serveconnection(CLIENT *client) {
+ if(do_run(client->server->prerun, client->exportname)) {
+ exit(EXIT_FAILURE);
+ }
setupexport(client);
if (client->server->flags & F_COPYONWRITE) {
setmysockopt(client->net);
- if(!do_run(client->server->prerun, client->exportname)) {
- mainloop(client);
- }
+ mainloop(client);
do_run(client->server->postrun, client->exportname);
}
}
/* child */
g_hash_table_destroy(children);
- for(i=0;i<servers->len,serve=(g_array_index(servers, SERVER*, i));i++) {
+ for(i=0;i<servers->len;i++) {
+ serve=g_array_index(servers, SERVER*, i);
close(serve->socket);
}
/* FALSE does not free the