mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
dix: Close protocol.txt after we're done loading extension names
Don't leave this file open during the whole server execution process; close it once all of the extensions are initialized. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
@@ -269,6 +269,8 @@ dix_main(int argc, char *argv[], char *envp[])
|
||||
|
||||
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
|
||||
|
||||
dixCloseRegistry();
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if (!noPanoramiXExtension) {
|
||||
if (!PanoramiXCreateConnectionBlock()) {
|
||||
|
||||
@@ -309,7 +309,11 @@ dixFreeRegistry(void)
|
||||
resources = NULL;
|
||||
|
||||
nmajor = nevent = nerror = nresource = 0;
|
||||
}
|
||||
|
||||
void
|
||||
dixCloseRegistry(void)
|
||||
{
|
||||
if (fh) {
|
||||
fclose(fh);
|
||||
fh = NULL;
|
||||
|
||||
@@ -45,6 +45,7 @@ extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype);
|
||||
*/
|
||||
extern _X_EXPORT void dixResetRegistry(void);
|
||||
extern _X_EXPORT void dixFreeRegistry(void);
|
||||
extern _X_EXPORT void dixCloseRegistry(void);
|
||||
|
||||
#else /* XREGISTRY */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user