]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Check for abstract sockets only once.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 Apr 2018 18:31:05 +0000 (20:31 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 12 Aug 2018 08:00:49 +0000 (10:00 +0200)
In net.c there is a static variable which is supposed to cache whether
the abstract local socket namespace is supported. This variable is
pointless because it is only ever set by command handlers, which exit
after the command completed. Hence the command handler process of
each subsequent afs command checks again. To make the caching work as
intended we must initialize the variable in the *parent* process. The
parent process, however, does not create any local sockets.

This patch changes init_unix_addr() to initialize the variable
without creating a socket when NULL is passed as the name parameter.
The server process passes NULL to initialize the static variable
while command handlers pass non NULL.


No differences found