From: Andre Noll Date: Mon, 30 Apr 2018 18:31:05 +0000 (+0200) Subject: Check for abstract sockets only once. X-Git-Tag: v0.6.3~84 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=52cb435d3d628d27fa781b31519470eb5ef70a4a;hp=52cb435d3d628d27fa781b31519470eb5ef70a4a;ds=sidebyside Check for abstract sockets only once. 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. ---