[PATCH 1/5] Added OnMsg to MamaDQPublisherManager


Ian Bell <IBell@...>
 

From c6056d16f347a98054cb70348d5fbcc988abbf60 Mon Sep 17 00:00:00 2001

Message-Id: <c6056d16f347a98054cb70348d5fbcc988abbf60.1348577193.git.ibell@...>

From: Ian Bell <ibell@...>

Date: Tue, 25 Sep 2012 13:11:26 +0100

Subject: [PATCH 1/5] Added OnMsg to MamaDQPublisherManager

 

Added a generic onMsg callback to the c dqpublishermanager to handle msgs

which differ from teh standard request format.

Also hooked this up in CPP wrapper.  The CPP callback already existed.

 

Signed-off-by: Ian Bell <ibell@...>

---

mama/c_cpp/src/c/dqpublishermanager.c         |   10 ++--

mama/c_cpp/src/c/mama/dqpublishermanager.h    |    4 ++

mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp |   65 ++++++++++++++++---------

3 files changed, 54 insertions(+), 25 deletions(-)

 

diff --git a/mama/c_cpp/src/c/dqpublishermanager.c b/mama/c_cpp/src/c/dqpublishermanager.c

index 1e61413..3aaf061 100644

--- a/mama/c_cpp/src/c/dqpublishermanager.c

+++ b/mama/c_cpp/src/c/dqpublishermanager.c

@@ -109,7 +109,7 @@ inboxErrorCb (mama_status status, void *closure)

             "Send sync failure", NULL);

}

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplCreateCb (mamaSubscription subsc, void* closure)

{

     mamaDQPublisherManagerImpl* impl = (mamaDQPublisherManagerImpl*) (closure);

@@ -120,7 +120,7 @@ dqPublisherImplCreateCb (mamaSubscription subsc, void* closure)

}

 

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplErrorCb (mamaSubscription subsc,

                         mama_status      status,

                         void*            platformError,

@@ -135,7 +135,7 @@ dqPublisherImplErrorCb (mamaSubscription subsc,

     impl->mUserCallbacks.onError ((mamaDQPublisherManager)impl, status, subject, NULL);

}

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplMsgCb (mamaSubscription subsc,

                       mamaMsg          msg,

                       void*            closure,

@@ -206,6 +206,10 @@ dqPublisherImplMsgCb (mamaSubscription subsc,

         }

     }

+    else

+    {

+        impl->mUserCallbacks.onMsg ((mamaDQPublisherManager)impl, msg);

+    }

}

 

diff --git a/mama/c_cpp/src/c/mama/dqpublishermanager.h b/mama/c_cpp/src/c/mama/dqpublishermanager.h

index ff1b80a..6bf2650 100644

--- a/mama/c_cpp/src/c/mama/dqpublishermanager.h

+++ b/mama/c_cpp/src/c/mama/dqpublishermanager.h

@@ -69,6 +69,9 @@ typedef void (MAMACALLTYPE *mamaDQPublisherErrorCB)(

         const char*        errortxt,

         mamaMsg     msg);

+typedef void (MAMACALLTYPE *mamaDQPublisherMsgCB)(

+        mamaDQPublisherManager manager,

+        mamaMsg     msg);

 typedef struct mamaDQPublisherManagerCallbacks_

{

@@ -77,6 +80,7 @@ typedef struct mamaDQPublisherManagerCallbacks_

     mamaDQPublisherRequestCB        onRequest;

     mamaDQPublisherRefreshCB        onRefresh;

     mamaDQPublisherErrorCB          onError;

+    mamaDQPublisherMsgCB            onMsg;

} mamaDQPublisherManagerCallbacks;

 

diff --git a/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp b/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

index a08ce7f..b492024 100644

--- a/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

+++ b/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

@@ -84,6 +84,10 @@ public:

                               short                                                                     msgType,

                               MamaMsg&                                                       msg);

+             virtual void onMsg (

+                             MamaDQPublisherManager*     publisher,

+                             MamaMsg&                                                       msg);

+

               virtual void onError (

                               MamaDQPublisherManager*     publisher,

                               const MamaStatus&                                       status,

@@ -141,6 +145,17 @@ void DQPublisherManagerTestCallback::onRefresh (MamaDQPublisherManager* publishe

               }

}

+void DQPublisherManagerTestCallback::onMsg (MamaDQPublisherManager* publisher, MamaMsg& msg)

+{

+             try {

+                             mCallback->onMsg(publisher, msg);

+             }

+             catch (...)

+             {

+                             fprintf (stderr, "MamaDQPublisherCallback onMsg EXCEPTION CAUGHT\n");

+             }

+}

+

void DQPublisherManagerTestCallback::onError (MamaDQPublisherManager* publisher, const MamaStatus& status, const char* errortxt, MamaMsg* msg)

{

               try {

@@ -156,8 +171,8 @@ void DQPublisherManagerTestCallback::onError (MamaDQPublisherManager* publisher,

struct MamaDQPublisherManagerImpl

{

     MamaDQPublisherManagerImpl (MamaDQPublisherManager* publisher):

-                              mCallback                                                            (NULL),

-        mParent                 (publisher)

+        mParent                 (publisher),

+                             mCallback                                                            (NULL)

     {

                mamaDQPublisherManager_allocate(&mDQPublisherManager);

                mReuseableMsg.create();

@@ -196,7 +211,7 @@ void MAMACALLTYPE dqPublisherManagerImplCreateCb (

{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mCallback->onCreate(mImpl->mParent);

-    }

+}

    

 void MAMACALLTYPE dqPublisherManagerImplNewRequestCb(

         mamaDQPublisherManager manager,

@@ -204,11 +219,11 @@ void MAMACALLTYPE dqPublisherManagerImplNewRequestCb(

         short  subType,

         short    msgType,

         mamaMsg     msg)

-    {

+{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mReuseableMsg.setMsg(msg);

               mImpl->mCallback->onNewRequest(mImpl->mParent, symbol, subType,msgType, mImpl->mReuseableMsg);

-    }

+}

 void MAMACALLTYPE dqPublisherManagerImplRequestCb(

         mamaDQPublisherManager manager,

@@ -216,7 +231,7 @@ void MAMACALLTYPE dqPublisherManagerImplRequestCb(

         short  subType,

         short    msgType,

         mamaMsg     msg)

-    {

+{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mReuseableMsg.setMsg(msg);

               mImpl->setInfo(info);

@@ -247,6 +262,14 @@ void MAMACALLTYPE dqPublisherManagerImplErrorCb(

               mImpl->mCallback->onError(mImpl->mParent, MamaStatus(status), errortxt, &mImpl->mReuseableMsg);

}

+void MAMACALLTYPE dqPublisherManagerImplMsgCb(

+        mamaDQPublisherManager manager,

+        mamaMsg     msg)

+{

+             MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

+             mImpl->mReuseableMsg.setMsg(msg);

+             mImpl->mCallback->onMsg(mImpl->mParent, mImpl->mReuseableMsg);

+}

 

 

@@ -367,11 +390,12 @@ void MamaDQPublisherManagerImpl::create (MamaTransport *transport,

     // This static structure contains all of the callback function pointers

     static mamaDQPublisherManagerCallbacks aDQPublisherManagerCb =

     {

-                              dqPublisherManagerImplCreateCb,

-                              dqPublisherManagerImplNewRequestCb,

-                              dqPublisherManagerImplRequestCb,

-                              dqPublisherManagerImplRefreshCb,

-                              dqPublisherManagerImplErrorCb

+             dqPublisherManagerImplCreateCb,

+             dqPublisherManagerImplNewRequestCb,

+             dqPublisherManagerImplRequestCb,

+             dqPublisherManagerImplRefreshCb,

+        dqPublisherManagerImplErrorCb,

+        dqPublisherManagerImplMsgCb

     };

              

     mCallback = callback;

@@ -381,18 +405,15 @@ void MamaDQPublisherManagerImpl::create (MamaTransport *transport,

     }

 void MamaDQPublisherManagerImpl::destroy (void)

-              {

-

-       

-              mamaDQPublisherManager_destroy(mDQPublisherManager);

-

+{

+    mamaDQPublisherManager_destroy(mDQPublisherManager);

-              if (mamaInternal_getCatchCallbackExceptions())

-              {

-                              delete mCallback;

-                              mCallback = 0;

-              }

-              return;

+    if (mamaInternal_getCatchCallbackExceptions())

+    {

+             delete mCallback;

+             mCallback = 0;

+    }

+    return;

}

 

--

1.7.9.5

 




Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


Ian Bell <IBell@...>
 

 

Attached patch

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Ian Bell
Sent: 25 September 2012 13:49
To: openmama-dev@...
Subject: [Openmama-dev] [PATCH 1/5] Added OnMsg to MamaDQPublisherManager

 

From c6056d16f347a98054cb70348d5fbcc988abbf60 Mon Sep 17 00:00:00 2001

Message-Id: <c6056d16f347a98054cb70348d5fbcc988abbf60.1348577193.git.ibell@...>

From: Ian Bell <ibell@...>

Date: Tue, 25 Sep 2012 13:11:26 +0100

Subject: [PATCH 1/5] Added OnMsg to MamaDQPublisherManager

 

Added a generic onMsg callback to the c dqpublishermanager to handle msgs

which differ from teh standard request format.

Also hooked this up in CPP wrapper.  The CPP callback already existed.

 

Signed-off-by: Ian Bell <ibell@...>

---

mama/c_cpp/src/c/dqpublishermanager.c         |   10 ++--

mama/c_cpp/src/c/mama/dqpublishermanager.h    |    4 ++

mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp |   65 ++++++++++++++++---------

3 files changed, 54 insertions(+), 25 deletions(-)

 

diff --git a/mama/c_cpp/src/c/dqpublishermanager.c b/mama/c_cpp/src/c/dqpublishermanager.c

index 1e61413..3aaf061 100644

--- a/mama/c_cpp/src/c/dqpublishermanager.c

+++ b/mama/c_cpp/src/c/dqpublishermanager.c

@@ -109,7 +109,7 @@ inboxErrorCb (mama_status status, void *closure)

             "Send sync failure", NULL);

}

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplCreateCb (mamaSubscription subsc, void* closure)

{

     mamaDQPublisherManagerImpl* impl = (mamaDQPublisherManagerImpl*) (closure);

@@ -120,7 +120,7 @@ dqPublisherImplCreateCb (mamaSubscription subsc, void* closure)

}

 

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplErrorCb (mamaSubscription subsc,

                         mama_status      status,

                         void*            platformError,

@@ -135,7 +135,7 @@ dqPublisherImplErrorCb (mamaSubscription subsc,

     impl->mUserCallbacks.onError ((mamaDQPublisherManager)impl, status, subject, NULL);

}

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplMsgCb (mamaSubscription subsc,

                       mamaMsg          msg,

                       void*            closure,

@@ -206,6 +206,10 @@ dqPublisherImplMsgCb (mamaSubscription subsc,

         }

     }

+    else

+    {

+        impl->mUserCallbacks.onMsg ((mamaDQPublisherManager)impl, msg);

+    }

}

 

diff --git a/mama/c_cpp/src/c/mama/dqpublishermanager.h b/mama/c_cpp/src/c/mama/dqpublishermanager.h

index ff1b80a..6bf2650 100644

--- a/mama/c_cpp/src/c/mama/dqpublishermanager.h

+++ b/mama/c_cpp/src/c/mama/dqpublishermanager.h

@@ -69,6 +69,9 @@ typedef void (MAMACALLTYPE *mamaDQPublisherErrorCB)(

         const char*        errortxt,

         mamaMsg     msg);

+typedef void (MAMACALLTYPE *mamaDQPublisherMsgCB)(

+        mamaDQPublisherManager manager,

+        mamaMsg     msg);

 typedef struct mamaDQPublisherManagerCallbacks_

{

@@ -77,6 +80,7 @@ typedef struct mamaDQPublisherManagerCallbacks_

     mamaDQPublisherRequestCB        onRequest;

     mamaDQPublisherRefreshCB        onRefresh;

     mamaDQPublisherErrorCB          onError;

+    mamaDQPublisherMsgCB            onMsg;

} mamaDQPublisherManagerCallbacks;

 

diff --git a/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp b/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

index a08ce7f..b492024 100644

--- a/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

+++ b/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

@@ -84,6 +84,10 @@ public:

                               short                                                                     msgType,

                               MamaMsg&                                                       msg);

+             virtual void onMsg (

+                             MamaDQPublisherManager*     publisher,

+                             MamaMsg&                                                       msg);

+

               virtual void onError (

                               MamaDQPublisherManager*     publisher,

                               const MamaStatus&                                       status,

@@ -141,6 +145,17 @@ void DQPublisherManagerTestCallback::onRefresh (MamaDQPublisherManager* publishe

               }

}

+void DQPublisherManagerTestCallback::onMsg (MamaDQPublisherManager* publisher, MamaMsg& msg)

+{

+             try {

+                             mCallback->onMsg(publisher, msg);

+             }

+             catch (...)

+             {

+                             fprintf (stderr, "MamaDQPublisherCallback onMsg EXCEPTION CAUGHT\n");

+             }

+}

+

void DQPublisherManagerTestCallback::onError (MamaDQPublisherManager* publisher, const MamaStatus& status, const char* errortxt, MamaMsg* msg)

{

               try {

@@ -156,8 +171,8 @@ void DQPublisherManagerTestCallback::onError (MamaDQPublisherManager* publisher,

struct MamaDQPublisherManagerImpl

{

     MamaDQPublisherManagerImpl (MamaDQPublisherManager* publisher):

-                              mCallback                                                            (NULL),

-        mParent                 (publisher)

+        mParent                 (publisher),

+                             mCallback                                                            (NULL)

     {

                mamaDQPublisherManager_allocate(&mDQPublisherManager);

                mReuseableMsg.create();

@@ -196,7 +211,7 @@ void MAMACALLTYPE dqPublisherManagerImplCreateCb (

{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mCallback->onCreate(mImpl->mParent);

-    }

+}

    

 void MAMACALLTYPE dqPublisherManagerImplNewRequestCb(

         mamaDQPublisherManager manager,

@@ -204,11 +219,11 @@ void MAMACALLTYPE dqPublisherManagerImplNewRequestCb(

         short  subType,

         short    msgType,

         mamaMsg     msg)

-    {

+{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mReuseableMsg.setMsg(msg);

               mImpl->mCallback->onNewRequest(mImpl->mParent, symbol, subType,msgType, mImpl->mReuseableMsg);

-    }

+}

 void MAMACALLTYPE dqPublisherManagerImplRequestCb(

         mamaDQPublisherManager manager,

@@ -216,7 +231,7 @@ void MAMACALLTYPE dqPublisherManagerImplRequestCb(

         short  subType,

         short    msgType,

         mamaMsg     msg)

-    {

+{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mReuseableMsg.setMsg(msg);

               mImpl->setInfo(info);

@@ -247,6 +262,14 @@ void MAMACALLTYPE dqPublisherManagerImplErrorCb(

               mImpl->mCallback->onError(mImpl->mParent, MamaStatus(status), errortxt, &mImpl->mReuseableMsg);

}

+void MAMACALLTYPE dqPublisherManagerImplMsgCb(

+        mamaDQPublisherManager manager,

+        mamaMsg     msg)

+{

+             MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

+             mImpl->mReuseableMsg.setMsg(msg);

+             mImpl->mCallback->onMsg(mImpl->mParent, mImpl->mReuseableMsg);

+}

 

 

@@ -367,11 +390,12 @@ void MamaDQPublisherManagerImpl::create (MamaTransport *transport,

     // This static structure contains all of the callback function pointers

     static mamaDQPublisherManagerCallbacks aDQPublisherManagerCb =

     {

-                              dqPublisherManagerImplCreateCb,

-                              dqPublisherManagerImplNewRequestCb,

-                              dqPublisherManagerImplRequestCb,

-                              dqPublisherManagerImplRefreshCb,

-                              dqPublisherManagerImplErrorCb

+             dqPublisherManagerImplCreateCb,

+             dqPublisherManagerImplNewRequestCb,

+             dqPublisherManagerImplRequestCb,

+             dqPublisherManagerImplRefreshCb,

+        dqPublisherManagerImplErrorCb,

+        dqPublisherManagerImplMsgCb

     };

              

     mCallback = callback;

@@ -381,18 +405,15 @@ void MamaDQPublisherManagerImpl::create (MamaTransport *transport,

     }

 void MamaDQPublisherManagerImpl::destroy (void)

-              {

-

-       

-              mamaDQPublisherManager_destroy(mDQPublisherManager);

-

+{

+    mamaDQPublisherManager_destroy(mDQPublisherManager);

-              if (mamaInternal_getCatchCallbackExceptions())

-              {

-                              delete mCallback;

-                              mCallback = 0;

-              }

-              return;

+    if (mamaInternal_getCatchCallbackExceptions())

+    {

+             delete mCallback;

+             mCallback = 0;

+    }

+    return;

}

 

--

1.7.9.5

 

 



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.




Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


Glenn McClements <gmcclements@...>
 

Ian, 
Because this is a new and optional callback there need to be a NULL check before the onMsg() call below:

impl->mUserCallbacks.onMsg ((mamaDQPublisherManager)impl, msg)

Glenn 

From: Ian Bell <ibell@...>
Date: Tue, 25 Sep 2012 12:48:57 +0000
To: "openmama-dev@..." <openmama-dev@...>
Subject: [Openmama-dev] [PATCH 1/5] Added OnMsg to MamaDQPublisherManager

From c6056d16f347a98054cb70348d5fbcc988abbf60 Mon Sep 17 00:00:00 2001

Message-Id: <c6056d16f347a98054cb70348d5fbcc988abbf60.1348577193.git.ibell@...>

From: Ian Bell <ibell@...>

Date: Tue, 25 Sep 2012 13:11:26 +0100

Subject: [PATCH 1/5] Added OnMsg to MamaDQPublisherManager

 

Added a generic onMsg callback to the c dqpublishermanager to handle msgs

which differ from teh standard request format.

Also hooked this up in CPP wrapper.  The CPP callback already existed.

 

Signed-off-by: Ian Bell <ibell@...>

---

mama/c_cpp/src/c/dqpublishermanager.c         |   10 ++--

mama/c_cpp/src/c/mama/dqpublishermanager.h    |    4 ++

mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp |   65 ++++++++++++++++---------

3 files changed, 54 insertions(+), 25 deletions(-)

 

diff --git a/mama/c_cpp/src/c/dqpublishermanager.c b/mama/c_cpp/src/c/dqpublishermanager.c

index 1e61413..3aaf061 100644

--- a/mama/c_cpp/src/c/dqpublishermanager.c

+++ b/mama/c_cpp/src/c/dqpublishermanager.c

@@ -109,7 +109,7 @@ inboxErrorCb (mama_status status, void *closure)

             "Send sync failure", NULL);

}

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplCreateCb (mamaSubscription subsc, void* closure)

{

     mamaDQPublisherManagerImpl* impl = (mamaDQPublisherManagerImpl*) (closure);

@@ -120,7 +120,7 @@ dqPublisherImplCreateCb (mamaSubscription subsc, void* closure)

}

 

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplErrorCb (mamaSubscription subsc,

                         mama_status      status,

                         void*            platformError,

@@ -135,7 +135,7 @@ dqPublisherImplErrorCb (mamaSubscription subsc,

     impl->mUserCallbacks.onError ((mamaDQPublisherManager)impl, status, subject, NULL);

}

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplMsgCb (mamaSubscription subsc,

                       mamaMsg          msg,

                       void*            closure,

@@ -206,6 +206,10 @@ dqPublisherImplMsgCb (mamaSubscription subsc,

         }

     }

+    else

+    {

+        impl->mUserCallbacks.onMsg ((mamaDQPublisherManager)impl, msg);

+    }

}

 

diff --git a/mama/c_cpp/src/c/mama/dqpublishermanager.h b/mama/c_cpp/src/c/mama/dqpublishermanager.h

index ff1b80a..6bf2650 100644

--- a/mama/c_cpp/src/c/mama/dqpublishermanager.h

+++ b/mama/c_cpp/src/c/mama/dqpublishermanager.h

@@ -69,6 +69,9 @@ typedef void (MAMACALLTYPE *mamaDQPublisherErrorCB)(

         const char*        errortxt,

         mamaMsg     msg);

+typedef void (MAMACALLTYPE *mamaDQPublisherMsgCB)(

+        mamaDQPublisherManager manager,

+        mamaMsg     msg);

 typedef struct mamaDQPublisherManagerCallbacks_

{

@@ -77,6 +80,7 @@ typedef struct mamaDQPublisherManagerCallbacks_

     mamaDQPublisherRequestCB        onRequest;

     mamaDQPublisherRefreshCB        onRefresh;

     mamaDQPublisherErrorCB          onError;

+    mamaDQPublisherMsgCB            onMsg;

} mamaDQPublisherManagerCallbacks;

 

diff --git a/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp b/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

index a08ce7f..b492024 100644

--- a/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

+++ b/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

@@ -84,6 +84,10 @@ public:

                               short                                                                     msgType,

                               MamaMsg&                                                       msg);

+             virtual void onMsg (

+                             MamaDQPublisherManager*     publisher,

+                             MamaMsg&                                                       msg);

+

               virtual void onError (

                               MamaDQPublisherManager*     publisher,

                               const MamaStatus&                                       status,

@@ -141,6 +145,17 @@ void DQPublisherManagerTestCallback::onRefresh (MamaDQPublisherManager* publishe

               }

}

+void DQPublisherManagerTestCallback::onMsg (MamaDQPublisherManager* publisher, MamaMsg& msg)

+{

+             try {

+                             mCallback->onMsg(publisher, msg);

+             }

+             catch (...)

+             {

+                             fprintf (stderr, "MamaDQPublisherCallback onMsg EXCEPTION CAUGHT\n");

+             }

+}

+

void DQPublisherManagerTestCallback::onError (MamaDQPublisherManager* publisher, const MamaStatus& status, const char* errortxt, MamaMsg* msg)

{

               try {

@@ -156,8 +171,8 @@ void DQPublisherManagerTestCallback::onError (MamaDQPublisherManager* publisher,

struct MamaDQPublisherManagerImpl

{

     MamaDQPublisherManagerImpl (MamaDQPublisherManager* publisher):

-                              mCallback                                                            (NULL),

-        mParent                 (publisher)

+        mParent                 (publisher),

+                             mCallback                                                            (NULL)

     {

                mamaDQPublisherManager_allocate(&mDQPublisherManager);

                mReuseableMsg.create();

@@ -196,7 +211,7 @@ void MAMACALLTYPE dqPublisherManagerImplCreateCb (

{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mCallback->onCreate(mImpl->mParent);

-    }

+}

    

 void MAMACALLTYPE dqPublisherManagerImplNewRequestCb(

         mamaDQPublisherManager manager,

@@ -204,11 +219,11 @@ void MAMACALLTYPE dqPublisherManagerImplNewRequestCb(

         short  subType,

         short    msgType,

         mamaMsg     msg)

-    {

+{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mReuseableMsg.setMsg(msg);

               mImpl->mCallback->onNewRequest(mImpl->mParent, symbol, subType,msgType, mImpl->mReuseableMsg);

-    }

+}

 void MAMACALLTYPE dqPublisherManagerImplRequestCb(

         mamaDQPublisherManager manager,

@@ -216,7 +231,7 @@ void MAMACALLTYPE dqPublisherManagerImplRequestCb(

         short  subType,

         short    msgType,

         mamaMsg     msg)

-    {

+{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mReuseableMsg.setMsg(msg);

               mImpl->setInfo(info);

@@ -247,6 +262,14 @@ void MAMACALLTYPE dqPublisherManagerImplErrorCb(

               mImpl->mCallback->onError(mImpl->mParent, MamaStatus(status), errortxt, &mImpl->mReuseableMsg);

}

+void MAMACALLTYPE dqPublisherManagerImplMsgCb(

+        mamaDQPublisherManager manager,

+        mamaMsg     msg)

+{

+             MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

+             mImpl->mReuseableMsg.setMsg(msg);

+             mImpl->mCallback->onMsg(mImpl->mParent, mImpl->mReuseableMsg);

+}

 

 

@@ -367,11 +390,12 @@ void MamaDQPublisherManagerImpl::create (MamaTransport *transport,

     // This static structure contains all of the callback function pointers

     static mamaDQPublisherManagerCallbacks aDQPublisherManagerCb =

     {

-                              dqPublisherManagerImplCreateCb,

-                              dqPublisherManagerImplNewRequestCb,

-                              dqPublisherManagerImplRequestCb,

-                              dqPublisherManagerImplRefreshCb,

-                              dqPublisherManagerImplErrorCb

+             dqPublisherManagerImplCreateCb,

+             dqPublisherManagerImplNewRequestCb,

+             dqPublisherManagerImplRequestCb,

+             dqPublisherManagerImplRefreshCb,

+        dqPublisherManagerImplErrorCb,

+        dqPublisherManagerImplMsgCb

     };

              

     mCallback = callback;

@@ -381,18 +405,15 @@ void MamaDQPublisherManagerImpl::create (MamaTransport *transport,

     }

 void MamaDQPublisherManagerImpl::destroy (void)

-              {

-

-       

-              mamaDQPublisherManager_destroy(mDQPublisherManager);

-

+{

+    mamaDQPublisherManager_destroy(mDQPublisherManager);

-              if (mamaInternal_getCatchCallbackExceptions())

-              {

-                              delete mCallback;

-                              mCallback = 0;

-              }

-              return;

+    if (mamaInternal_getCatchCallbackExceptions())

+    {

+             delete mCallback;

+             mCallback = 0;

+    }

+    return;

}

 

--

1.7.9.5

 




Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
_______________________________________________ Openmama-dev mailing list Openmama-dev@... https://lists.openmama.org/mailman/listinfo/openmama-dev



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


Ian Bell <IBell@...>
 

Attached new patch with NULL check

 

From 5aea1b32ec5100cdf625dba4c69475324ed5c213 Mon Sep 17 00:00:00 2001

Message-Id: <5aea1b32ec5100cdf625dba4c69475324ed5c213.1349355732.git.ibell@...>

From: Ian Bell <ibell@...>

Date: Thu, 4 Oct 2012 13:56:23 +0100

Subject: [PATCH] [mamac] Added OnMsg to MamaDQPublisherManager

 

Added a generic onMsg callback to the c dqpublishermanager to handle msgs

which differ from teh standard request format.

Also hooked this up in CPP wrapper.  The CPP callback already existed.

 

Signed-off-by: Ian Bell <ibell@...>

---

mama/c_cpp/src/c/dqpublishermanager.c         |   11 +++--

mama/c_cpp/src/c/mama/dqpublishermanager.h    |    4 ++

mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp |   65 ++++++++++++++++---------

3 files changed, 55 insertions(+), 25 deletions(-)

 

diff --git a/mama/c_cpp/src/c/dqpublishermanager.c b/mama/c_cpp/src/c/dqpublishermanager.c

index 0f2b8ff..eb6b9a4 100644

--- a/mama/c_cpp/src/c/dqpublishermanager.c

+++ b/mama/c_cpp/src/c/dqpublishermanager.c

@@ -109,7 +109,7 @@ inboxErrorCb (mama_status status, void *closure)

             "Send sync failure", NULL);

}

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplCreateCb (mamaSubscription subsc, void* closure)

{

     mamaDQPublisherManagerImpl* impl = (mamaDQPublisherManagerImpl*) (closure);

@@ -120,7 +120,7 @@ dqPublisherImplCreateCb (mamaSubscription subsc, void* closure)

}

 

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplErrorCb (mamaSubscription subsc,

                         mama_status      status,

                         void*            platformError,

@@ -135,7 +135,7 @@ dqPublisherImplErrorCb (mamaSubscription subsc,

     impl->mUserCallbacks.onError ((mamaDQPublisherManager)impl, status, subject, NULL);

}

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplMsgCb (mamaSubscription subsc,

                       mamaMsg          msg,

                       void*            closure,

@@ -206,6 +206,11 @@ dqPublisherImplMsgCb (mamaSubscription subsc,

         }

     }

+    else

+    {

+                             if (impl->mUserCallbacks.onMsg)

+             impl->mUserCallbacks.onMsg ((mamaDQPublisherManager)impl, msg);

+    }

}

 

diff --git a/mama/c_cpp/src/c/mama/dqpublishermanager.h b/mama/c_cpp/src/c/mama/dqpublishermanager.h

index 2548193..da1728d 100644

--- a/mama/c_cpp/src/c/mama/dqpublishermanager.h

+++ b/mama/c_cpp/src/c/mama/dqpublishermanager.h

@@ -69,6 +69,9 @@ typedef void (MAMACALLTYPE *mamaDQPublisherErrorCB)(

         const char*        errortxt,

         mamaMsg     msg);

+typedef void (MAMACALLTYPE *mamaDQPublisherMsgCB)(

+        mamaDQPublisherManager manager,

+        mamaMsg     msg);

 typedef struct mamaDQPublisherManagerCallbacks_

{

@@ -77,6 +80,7 @@ typedef struct mamaDQPublisherManagerCallbacks_

     mamaDQPublisherRequestCB        onRequest;

     mamaDQPublisherRefreshCB        onRefresh;

     mamaDQPublisherErrorCB          onError;

+    mamaDQPublisherMsgCB            onMsg;

} mamaDQPublisherManagerCallbacks;

 

diff --git a/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp b/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

index a08ce7f..b492024 100644

--- a/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

+++ b/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

@@ -84,6 +84,10 @@ public:

                               short                                                                     msgType,

                               MamaMsg&                                                       msg);

+             virtual void onMsg (

+                             MamaDQPublisherManager*     publisher,

+                             MamaMsg&                                                       msg);

+

               virtual void onError (

                               MamaDQPublisherManager*     publisher,

                               const MamaStatus&                                       status,

@@ -141,6 +145,17 @@ void DQPublisherManagerTestCallback::onRefresh (MamaDQPublisherManager* publishe

               }

}

+void DQPublisherManagerTestCallback::onMsg (MamaDQPublisherManager* publisher, MamaMsg& msg)

+{

+             try {

+                             mCallback->onMsg(publisher, msg);

+             }

+             catch (...)

+             {

+                             fprintf (stderr, "MamaDQPublisherCallback onMsg EXCEPTION CAUGHT\n");

+             }

+}

+

void DQPublisherManagerTestCallback::onError (MamaDQPublisherManager* publisher, const MamaStatus& status, const char* errortxt, MamaMsg* msg)

{

               try {

@@ -156,8 +171,8 @@ void DQPublisherManagerTestCallback::onError (MamaDQPublisherManager* publisher,

struct MamaDQPublisherManagerImpl

{

     MamaDQPublisherManagerImpl (MamaDQPublisherManager* publisher):

-                              mCallback                                                            (NULL),

-        mParent                 (publisher)

+        mParent                 (publisher),

+                             mCallback                                                            (NULL)

     {

                mamaDQPublisherManager_allocate(&mDQPublisherManager);

                mReuseableMsg.create();

@@ -196,7 +211,7 @@ void MAMACALLTYPE dqPublisherManagerImplCreateCb (

{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mCallback->onCreate(mImpl->mParent);

-    }

+}

    

 void MAMACALLTYPE dqPublisherManagerImplNewRequestCb(

         mamaDQPublisherManager manager,

@@ -204,11 +219,11 @@ void MAMACALLTYPE dqPublisherManagerImplNewRequestCb(

         short  subType,

         short    msgType,

         mamaMsg     msg)

-    {

+{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mReuseableMsg.setMsg(msg);

               mImpl->mCallback->onNewRequest(mImpl->mParent, symbol, subType,msgType, mImpl->mReuseableMsg);

-    }

+}

 void MAMACALLTYPE dqPublisherManagerImplRequestCb(

         mamaDQPublisherManager manager,

@@ -216,7 +231,7 @@ void MAMACALLTYPE dqPublisherManagerImplRequestCb(

         short  subType,

         short    msgType,

         mamaMsg     msg)

-    {

+{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mReuseableMsg.setMsg(msg);

               mImpl->setInfo(info);

@@ -247,6 +262,14 @@ void MAMACALLTYPE dqPublisherManagerImplErrorCb(

               mImpl->mCallback->onError(mImpl->mParent, MamaStatus(status), errortxt, &mImpl->mReuseableMsg);

}

+void MAMACALLTYPE dqPublisherManagerImplMsgCb(

+        mamaDQPublisherManager manager,

+        mamaMsg     msg)

+{

+             MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

+             mImpl->mReuseableMsg.setMsg(msg);

+             mImpl->mCallback->onMsg(mImpl->mParent, mImpl->mReuseableMsg);

+}

 

 

@@ -367,11 +390,12 @@ void MamaDQPublisherManagerImpl::create (MamaTransport *transport,

     // This static structure contains all of the callback function pointers

     static mamaDQPublisherManagerCallbacks aDQPublisherManagerCb =

     {

-                              dqPublisherManagerImplCreateCb,

-                              dqPublisherManagerImplNewRequestCb,

-                              dqPublisherManagerImplRequestCb,

-                              dqPublisherManagerImplRefreshCb,

-                              dqPublisherManagerImplErrorCb

+             dqPublisherManagerImplCreateCb,

+             dqPublisherManagerImplNewRequestCb,

+             dqPublisherManagerImplRequestCb,

+             dqPublisherManagerImplRefreshCb,

+        dqPublisherManagerImplErrorCb,

+        dqPublisherManagerImplMsgCb

     };

              

     mCallback = callback;

@@ -381,18 +405,15 @@ void MamaDQPublisherManagerImpl::create (MamaTransport *transport,

     }

 void MamaDQPublisherManagerImpl::destroy (void)

-              {

-

-       

-              mamaDQPublisherManager_destroy(mDQPublisherManager);

-

+{

+    mamaDQPublisherManager_destroy(mDQPublisherManager);

-              if (mamaInternal_getCatchCallbackExceptions())

-              {

-                              delete mCallback;

-                              mCallback = 0;

-              }

-              return;

+    if (mamaInternal_getCatchCallbackExceptions())

+    {

+             delete mCallback;

+             mCallback = 0;

+    }

+    return;

}

 

--

1.7.9.5

 

 

From: Glenn McClements
Sent: 03 October 2012 16:50
To: Ian Bell
Cc: openmama-dev@...
Subject: Re: [Openmama-dev] [PATCH 1/5] Added OnMsg to MamaDQPublisherManager

 

Ian, 

Because this is a new and optional callback there need to be a NULL check before the onMsg() call below:

 

impl->mUserCallbacks.onMsg ((mamaDQPublisherManager)impl, msg)

 

Glenn 

 

From: Ian Bell <ibell@...>
Date: Tue, 25 Sep 2012 12:48:57 +0000
To: "openmama-dev@..." <openmama-dev@...>
Subject: [Openmama-dev] [PATCH 1/5] Added OnMsg to MamaDQPublisherManager

 

From c6056d16f347a98054cb70348d5fbcc988abbf60 Mon Sep 17 00:00:00 2001

Message-Id: <c6056d16f347a98054cb70348d5fbcc988abbf60.1348577193.git.ibell@...>

From: Ian Bell <ibell@...>

Date: Tue, 25 Sep 2012 13:11:26 +0100

Subject: [PATCH 1/5] Added OnMsg to MamaDQPublisherManager

 

Added a generic onMsg callback to the c dqpublishermanager to handle msgs

which differ from teh standard request format.

Also hooked this up in CPP wrapper.  The CPP callback already existed.

 

Signed-off-by: Ian Bell <ibell@...>

---

mama/c_cpp/src/c/dqpublishermanager.c         |   10 ++--

mama/c_cpp/src/c/mama/dqpublishermanager.h    |    4 ++

mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp |   65 ++++++++++++++++---------

3 files changed, 54 insertions(+), 25 deletions(-)

 

diff --git a/mama/c_cpp/src/c/dqpublishermanager.c b/mama/c_cpp/src/c/dqpublishermanager.c

index 1e61413..3aaf061 100644

--- a/mama/c_cpp/src/c/dqpublishermanager.c

+++ b/mama/c_cpp/src/c/dqpublishermanager.c

@@ -109,7 +109,7 @@ inboxErrorCb (mama_status status, void *closure)

             "Send sync failure", NULL);

}

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplCreateCb (mamaSubscription subsc, void* closure)

{

     mamaDQPublisherManagerImpl* impl = (mamaDQPublisherManagerImpl*) (closure);

@@ -120,7 +120,7 @@ dqPublisherImplCreateCb (mamaSubscription subsc, void* closure)

}

 

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplErrorCb (mamaSubscription subsc,

                         mama_status      status,

                         void*            platformError,

@@ -135,7 +135,7 @@ dqPublisherImplErrorCb (mamaSubscription subsc,

     impl->mUserCallbacks.onError ((mamaDQPublisherManager)impl, status, subject, NULL);

}

-void MAMACALLTYPE

+static void MAMACALLTYPE

dqPublisherImplMsgCb (mamaSubscription subsc,

                       mamaMsg          msg,

                       void*            closure,

@@ -206,6 +206,10 @@ dqPublisherImplMsgCb (mamaSubscription subsc,

         }

     }

+    else

+    {

+        impl->mUserCallbacks.onMsg ((mamaDQPublisherManager)impl, msg);

+    }

}

 

diff --git a/mama/c_cpp/src/c/mama/dqpublishermanager.h b/mama/c_cpp/src/c/mama/dqpublishermanager.h

index ff1b80a..6bf2650 100644

--- a/mama/c_cpp/src/c/mama/dqpublishermanager.h

+++ b/mama/c_cpp/src/c/mama/dqpublishermanager.h

@@ -69,6 +69,9 @@ typedef void (MAMACALLTYPE *mamaDQPublisherErrorCB)(

         const char*        errortxt,

         mamaMsg     msg);

+typedef void (MAMACALLTYPE *mamaDQPublisherMsgCB)(

+        mamaDQPublisherManager manager,

+        mamaMsg     msg);

 typedef struct mamaDQPublisherManagerCallbacks_

{

@@ -77,6 +80,7 @@ typedef struct mamaDQPublisherManagerCallbacks_

     mamaDQPublisherRequestCB        onRequest;

     mamaDQPublisherRefreshCB        onRefresh;

     mamaDQPublisherErrorCB          onError;

+    mamaDQPublisherMsgCB            onMsg;

} mamaDQPublisherManagerCallbacks;

 

diff --git a/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp b/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

index a08ce7f..b492024 100644

--- a/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

+++ b/mama/c_cpp/src/cpp/MamaDQPublisherManager.cpp

@@ -84,6 +84,10 @@ public:

                               short                                                                     msgType,

                               MamaMsg&                                                       msg);

+             virtual void onMsg (

+                             MamaDQPublisherManager*     publisher,

+                             MamaMsg&                                                       msg);

+

               virtual void onError (

                               MamaDQPublisherManager*     publisher,

                               const MamaStatus&                                       status,

@@ -141,6 +145,17 @@ void DQPublisherManagerTestCallback::onRefresh (MamaDQPublisherManager* publishe

               }

}

+void DQPublisherManagerTestCallback::onMsg (MamaDQPublisherManager* publisher, MamaMsg& msg)

+{

+             try {

+                             mCallback->onMsg(publisher, msg);

+             }

+             catch (...)

+             {

+                             fprintf (stderr, "MamaDQPublisherCallback onMsg EXCEPTION CAUGHT\n");

+             }

+}

+

void DQPublisherManagerTestCallback::onError (MamaDQPublisherManager* publisher, const MamaStatus& status, const char* errortxt, MamaMsg* msg)

{

               try {

@@ -156,8 +171,8 @@ void DQPublisherManagerTestCallback::onError (MamaDQPublisherManager* publisher,

struct MamaDQPublisherManagerImpl

{

     MamaDQPublisherManagerImpl (MamaDQPublisherManager* publisher):

-                              mCallback                                                            (NULL),

-        mParent                 (publisher)

+        mParent                 (publisher),

+                             mCallback                                                            (NULL)

     {

                mamaDQPublisherManager_allocate(&mDQPublisherManager);

                mReuseableMsg.create();

@@ -196,7 +211,7 @@ void MAMACALLTYPE dqPublisherManagerImplCreateCb (

{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mCallback->onCreate(mImpl->mParent);

-    }

+}

    

 void MAMACALLTYPE dqPublisherManagerImplNewRequestCb(

         mamaDQPublisherManager manager,

@@ -204,11 +219,11 @@ void MAMACALLTYPE dqPublisherManagerImplNewRequestCb(

         short  subType,

         short    msgType,

         mamaMsg     msg)

-    {

+{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mReuseableMsg.setMsg(msg);

               mImpl->mCallback->onNewRequest(mImpl->mParent, symbol, subType,msgType, mImpl->mReuseableMsg);

-    }

+}

 void MAMACALLTYPE dqPublisherManagerImplRequestCb(

         mamaDQPublisherManager manager,

@@ -216,7 +231,7 @@ void MAMACALLTYPE dqPublisherManagerImplRequestCb(

         short  subType,

         short    msgType,

         mamaMsg     msg)

-    {

+{

               MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

               mImpl->mReuseableMsg.setMsg(msg);

               mImpl->setInfo(info);

@@ -247,6 +262,14 @@ void MAMACALLTYPE dqPublisherManagerImplErrorCb(

               mImpl->mCallback->onError(mImpl->mParent, MamaStatus(status), errortxt, &mImpl->mReuseableMsg);

}

+void MAMACALLTYPE dqPublisherManagerImplMsgCb(

+        mamaDQPublisherManager manager,

+        mamaMsg     msg)

+{

+             MamaDQPublisherManagerImpl* mImpl = (MamaDQPublisherManagerImpl*)mamaDQPublisherManager_getClosure(manager);

+             mImpl->mReuseableMsg.setMsg(msg);

+             mImpl->mCallback->onMsg(mImpl->mParent, mImpl->mReuseableMsg);

+}

 

 

@@ -367,11 +390,12 @@ void MamaDQPublisherManagerImpl::create (MamaTransport *transport,

     // This static structure contains all of the callback function pointers

     static mamaDQPublisherManagerCallbacks aDQPublisherManagerCb =

     {

-                              dqPublisherManagerImplCreateCb,

-                              dqPublisherManagerImplNewRequestCb,

-                              dqPublisherManagerImplRequestCb,

-                              dqPublisherManagerImplRefreshCb,

-                              dqPublisherManagerImplErrorCb

+             dqPublisherManagerImplCreateCb,

+             dqPublisherManagerImplNewRequestCb,

+             dqPublisherManagerImplRequestCb,

+             dqPublisherManagerImplRefreshCb,

+        dqPublisherManagerImplErrorCb,

+        dqPublisherManagerImplMsgCb

     };

              

     mCallback = callback;

@@ -381,18 +405,15 @@ void MamaDQPublisherManagerImpl::create (MamaTransport *transport,

     }

 void MamaDQPublisherManagerImpl::destroy (void)

-              {

-

-       

-              mamaDQPublisherManager_destroy(mDQPublisherManager);

-

+{

+    mamaDQPublisherManager_destroy(mDQPublisherManager);

-              if (mamaInternal_getCatchCallbackExceptions())

-              {

-                              delete mCallback;

-                              mCallback = 0;

-              }

-              return;

+    if (mamaInternal_getCatchCallbackExceptions())

+    {

+             delete mCallback;

+             mCallback = 0;

+    }

+    return;

}

 

--

1.7.9.5

 

 



Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

_______________________________________________ Openmama-dev mailing list Openmama-dev@... https://lists.openmama.org/mailman/listinfo/openmama-dev




Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.