Bug 8937 - Extension setup functions not called on server resets
Summary: Extension setup functions not called on server resets
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: All All
: high normal
Assignee: Eamon Walsh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 8875
  Show dependency treegraph
 
Reported: 2006-11-07 10:41 UTC by Eamon Walsh
Modified: 2006-11-07 12:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Eamon Walsh 2006-11-07 10:41:07 UTC
Extension setup functions are not called when the server resets and when
XFree86LOADER is defined.  This is causing extensions that allocate devPrivates
space in their setup function to fail to do so on a server reset.

Solution is to call setup functions from InitExtensions() in miinitext.c.
Comment 1 Eamon Walsh 2006-11-07 12:56:46 UTC
Patch applied:

diff --git a/mi/miinitext.c b/mi/miinitext.c
index f618595..cb34473 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -754,6 +754,16 @@ InitExtensions(argc, argv)
        /* Sort the extensions according the init dependencies. */
        LoaderSortExtensions();
        listInitialised = TRUE;
+    } else {
+       /* Call the setup functions on subsequent server resets as well */
+       for (i = 0; ExtensionModuleList[i].name != NULL; i++) {
+           ext = &ExtensionModuleList[i];
+           if (ext->setupFunc != NULL &&
+               (ext->disablePtr == NULL ||
+                (ext->disablePtr != NULL && !*ext->disablePtr))) {
+               (ext->setupFunc)();
+           }
+       }
     }
 
     for (i = 0; ExtensionModuleList[i].name != NULL; i++) {


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.