[Freeswitch-svn] [commit] r10133 - freeswitch/trunk/src/mod/languages/mod_managed/managed

Freeswitch SVN michaelgg at freeswitch.org
Thu Oct 23 13:40:06 EDT 2008


Author: michaelgg
Date: Thu Oct 23 13:40:06 2008
New Revision: 10133

Modified:
   freeswitch/trunk/src/mod/languages/mod_managed/managed/ManagedSession.cs

Log:
Actually USE the saved references....

Modified: freeswitch/trunk/src/mod/languages/mod_managed/managed/ManagedSession.cs
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_managed/managed/ManagedSession.cs	(original)
+++ freeswitch/trunk/src/mod/languages/mod_managed/managed/ManagedSession.cs	Thu Oct 23 13:40:06 2008
@@ -47,7 +47,7 @@
     {
         // SWITCH_DECLARE(void) InitManagedSession(ManagedSession *session, MonoObject *dtmfDelegate, MonoObject *hangupDelegate)
         [DllImport("mod_managed.dll", CharSet = CharSet.Ansi, CallingConvention=CallingConvention.Cdecl)]
-        static extern void InitManagedSession(IntPtr sessionPtr, DtmfCallback dtmfDelegate, Action hangupDelegate);
+        static extern void InitManagedSession(IntPtr sessionPtr, DtmfCallback dtmfDelegate, CdeclAction hangupDelegate);
 
         /// <summary>Initializes the native ManagedSession. Must be called after Originate.</summary>
         public void Initialize()
@@ -57,11 +57,11 @@
             // So we don't need to worry about GCHandles and all that....
             // Info here: http://blogs.msdn.com/cbrumme/archive/2003/05/06/51385.aspx
             this._inputCallbackRef = inputCallback;
-            this._hangupCallback = hangupCallback;
-            InitManagedSession(ManagedSession.getCPtr(this).Handle, inputCallback, hangupCallback);
+            this._hangupCallbackRef = hangupCallback;
+            InitManagedSession(ManagedSession.getCPtr(this).Handle, this._inputCallbackRef, this._hangupCallbackRef);
         }
         DtmfCallback _inputCallbackRef;
-        CdeclAction _hangupCallback;
+        CdeclAction _hangupCallbackRef;
 
         /// <summary>Function to execute when this session hangs up.</summary>
         public Action HangupFunction { get; set; }



More information about the Freeswitch-svn mailing list