[ros-diffs] [janderwald] 41353: - Store servicegroup obtained from IMiniportDMus / IMiniportMidi Init function when IPortDMus / IPortMidi RegisterServiceGroup is not called

janderwald at svn.reactos.org janderwald at svn.reactos.org
Tue Jun 9 00:02:47 CEST 2009


Author: janderwald
Date: Tue Jun  9 02:02:46 2009
New Revision: 41353

URL: http://svn.reactos.org/svn/reactos?rev=41353&view=rev
Log:
- Store servicegroup obtained from IMiniportDMus / IMiniportMidi Init function when IPortDMus / IPortMidi RegisterServiceGroup is not called

Modified:
    trunk/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.c

Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.c?rev=41353&r1=41352&r2=41353&view=diff
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.c [iso-8859-1] Tue Jun  9 02:02:46 2009
@@ -164,7 +164,7 @@
     IMiniportDMus * Miniport = NULL;
     IMiniportMidi * MidiMiniport = NULL;
     NTSTATUS Status;
-    PSERVICEGROUP ServiceGroup;
+    PSERVICEGROUP ServiceGroup = NULL;
     PPINCOUNT PinCount;
     PPOWERNOTIFY PowerNotify;
     IPortDMusImpl * This = (IPortDMusImpl*)iface;
@@ -263,8 +263,11 @@
         return Status;
     }
 
-    ASSERT(This->ServiceGroup);
-    ASSERT(ServiceGroup == This->ServiceGroup);
+    if (This->ServiceGroup == NULL && ServiceGroup)
+    {
+        /* register service group */
+        This->ServiceGroup = ServiceGroup;
+    }
 
     /* Initialize port object */
     This->pMiniport = Miniport;



More information about the Ros-diffs mailing list