Ack
/Hans

> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Sent: den 23 juni 2014 14:14
> To: Hans Feldt; [email protected]
> Cc: [email protected]
> Subject: [PATCH 1 of 4] amfd : send old state of AMF entities in 
> notifications [#106]
> 
>  osaf/services/saf/amf/amfd/include/ntf.h |   1 +
>  osaf/services/saf/amf/amfd/ntf.cc        |  11 ++++++++++-
>  2 files changed, 11 insertions(+), 1 deletions(-)
> 
> 
> Now AMF includes old state also while generating notifications for change in
> admin state, operational state, presence state, HA state and assignment state
> of applicable AMF entities.
> 
> See #106 for sample notifications.
> 
> diff --git a/osaf/services/saf/amf/amfd/include/ntf.h 
> b/osaf/services/saf/amf/amfd/include/ntf.h
> --- a/osaf/services/saf/amf/amfd/include/ntf.h
> +++ b/osaf/services/saf/amf/amfd/include/ntf.h
> @@ -85,6 +85,7 @@ uint32_t sendStateChangeNotificationAvd(
>                                             SaUint16T minorId,
>                                             uint32_t sourceIndicator,
>                                             SaUint16T stateId,
> +                                           SaUint16T oldState,
>                                             SaUint16T newState,
>                                             NCSCONTEXT add_info,
>                                             int type); /* add_info 0 --> no,  
> 1--> node_name, 2--> si_name*/
> diff --git a/osaf/services/saf/amf/amfd/ntf.cc 
> b/osaf/services/saf/amf/amfd/ntf.cc
> --- a/osaf/services/saf/amf/amfd/ntf.cc
> +++ b/osaf/services/saf/amf/amfd/ntf.cc
> @@ -217,6 +217,7 @@ void avd_send_admin_state_chg_ntf(const
>                                       minor_id,
>                                       SA_NTF_MANAGEMENT_OPERATION,
>                                       SA_AMF_ADMIN_STATE,
> +                                     old_state,
>                                       new_state,
>                                       NULL,
>                                       0);
> @@ -252,6 +253,7 @@ void avd_send_oper_chg_ntf(const SaNameT
>                                       minor_id,
>                                       SA_NTF_OBJECT_OPERATION,
>                                       SA_AMF_OP_STATE,
> +                                     old_state,
>                                       new_state,
>                                       NULL,
>                                       0);
> @@ -286,6 +288,7 @@ void avd_send_su_pres_state_chg_ntf(cons
>                                       SA_AMF_NTFID_SU_PRESENCE_STATE,
>                                       SA_NTF_OBJECT_OPERATION,
>                                       SA_AMF_PRESENCE_STATE,
> +                                     old_state,
>                                       new_state,
>                                       NULL,
>                                       0);
> @@ -324,6 +327,7 @@ void avd_send_su_ha_state_chg_ntf(const
>                                       SA_AMF_NTFID_SU_SI_HA_STATE,
>                                       SA_NTF_OBJECT_OPERATION,
>                                       SA_AMF_HA_STATE,
> +                                     old_state,
>                                       new_state,
>                                       (NCSCONTEXT)si_name,
>                                       2 /* Si_name */);
> @@ -360,6 +364,7 @@ void avd_send_su_ha_readiness_state_chg_
>                                       SA_AMF_NTFID_SU_SI_HA_READINESS_STATE,
>                                       SA_NTF_OBJECT_OPERATION,
>                                       SA_AMF_HA_READINESS_STATE,
> +                                     old_state,
>                                       new_state,
>                                       (NCSCONTEXT)si_name,
>                                       2 /* Si_name */);
> @@ -394,6 +399,7 @@ void avd_send_si_assigned_ntf(const SaNa
>                                       SA_AMF_NTFID_SI_ASSIGNMENT_STATE,
>                                       SA_NTF_OBJECT_OPERATION,
>                                       SA_AMF_ASSIGNMENT_STATE,
> +                                     old_state,
>                                       new_state,
>                                       NULL,
>                                       0);
> @@ -430,6 +436,7 @@ void avd_send_comp_proxy_status_proxied_
>                                       SA_AMF_NTFID_COMP_PROXY_STATUS,
>                                       SA_NTF_OBJECT_OPERATION,
>                                       SA_AMF_PROXY_STATUS,
> +                                     old_status,
>                                       new_status,
>                                       NULL,
>                                       0);
> @@ -620,6 +627,7 @@ uint32_t sendStateChangeNotificationAvd(
>                                    SaUint16T minorId,
>                                    uint32_t sourceIndicator,
>                                    SaUint16T stateId,
> +                                  SaUint16T oldstate,
>                                    SaUint16T newState,
>                                    NCSCONTEXT add_info,
>                                    int type)
> @@ -677,7 +685,8 @@ uint32_t sendStateChangeNotificationAvd(
> 
>       *(myStateNotification.sourceIndicator) = 
> static_cast<SaNtfSourceIndicatorT>(sourceIndicator);
>       myStateNotification.changedStates->stateId = stateId;
> -     myStateNotification.changedStates->oldStatePresent = SA_FALSE;
> +     myStateNotification.changedStates->oldStatePresent = SA_TRUE;
> +     myStateNotification.changedStates->oldState = oldstate;
>       myStateNotification.changedStates->newState = newState;
> 
>       status = saNtfNotificationSend(myStateNotification.notificationHandle);

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to