Re: [devel] Tickets to review in Amf

2013-12-05 Thread praveen malviya
Hi AMF Maintainers,
Along with the mentioned list of tickets, following three tickets will 
also be pushed/closed by Friday. Please review.

81 SU un-instantiation should be supported in specified order.
90 In nway model, quiesced callbacks are generated for sponser SI first 
then dependent SIs after payload node lock.
97 AVSv: AMF framework needs to support SAF_CLC_NO_RETRY (200) error 
code from clc-cli command.

Thanks
Praveen
On 04-Dec-13 6:19 PM, Nagendra Kumar wrote:
 Hi all,

  We would like to close/commit these tickets by this Friday. 
 Can you please review them.

   

 HYPERLINK https://sourceforge.net/p/opensaf/tickets/104/104 HYPERLINK 
 https://sourceforge.net/p/opensaf/tickets/104/AMF: wrong CLC command used 
 at component restart 4.2.5 review Nagendra Kumar amf

 HYPERLINK https://sourceforge.net/p/opensaf/tickets/214/214 HYPERLINK 
 https://sourceforge.net/p/opensaf/tickets/214/amf: si-swap initiated on SI3 
 but received completion info for SI2. 4.2.5 review Nagendra Kumar amf

 HYPERLINK https://sourceforge.net/p/opensaf/tickets/600/600 HYPERLINK 
 https://sourceforge.net/p/opensaf/tickets/600/Payload is clueless when link 
 between Payload and Act Controller is reset. 4.2.5 review Nagendra Kumar amf

 HYPERLINK https://sourceforge.net/p/opensaf/tickets/627/627 HYPERLINK 
 https://sourceforge.net/p/opensaf/tickets/627/Admin command hangs when CSI 
 Delete is in progress 4.2.5 review Nagendra Kumar amf

 HYPERLINK https://sourceforge.net/p/opensaf/tickets/170/170 HYPERLINK 
 https://sourceforge.net/p/opensaf/tickets/170/AMF: Unimplemented code 
 should return ERR_NOT_SUPPORTED instead of INVALID_PARAM 4.2.5 review Praveen 
 amf

 HYPERLINK https://sourceforge.net/p/opensaf/tickets/203/203 HYPERLINK 
 https://sourceforge.net/p/opensaf/tickets/203/avsv: SG went to unstable 
 state when active SU is locked after adding new SI in NWay RM 4.2.5 review 
 Praveen amf

 HYPERLINK https://sourceforge.net/p/opensaf/tickets/233/233 HYPERLINK 
 https://sourceforge.net/p/opensaf/tickets/233/admin lock on SUs are getting 
 timeout. 4.2.5 review Praveen amf

 HYPERLINK https://sourceforge.net/p/opensaf/tickets/294/294 HYPERLINK 
 https://sourceforge.net/p/opensaf/tickets/294/Error escalation for a 
 component is going from COMPONENT RESTART to SU FAILOVER without SU RESTART 
 during si-swap operation 4.2.5 review Praveen amf

 HYPERLINK https://sourceforge.net/p/opensaf/tickets/490/490 HYPERLINK 
 https://sourceforge.net/p/opensaf/tickets/490/amf: Shutdown operation on SI 
 with faults still shows assignments. 4.2.5 review Praveen amf

 HYPERLINK https://sourceforge.net/p/opensaf/tickets/503/503 HYPERLINK 
 https://sourceforge.net/p/opensaf/tickets/503/SU failover was not happening 
 during SI-SI dependency flow. 4.2.5 review Praveen amf

   

   

 Thanks

 -Nagu
 --
 Sponsored by Intel(R) XDK
 Develop, test and display web and hybrid apps with a single code base.
 Download it for free now!
 http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
 ___
 Opensaf-devel mailing list
 Opensaf-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/opensaf-devel


--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 13 of 16] base: Removed unused macros from ncs_tmr.h [#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/core/include/ncs_tmr.h |   3 ---
 osaf/libs/core/leap/hj_tmr.c |  11 +--
 2 files changed, 5 insertions(+), 9 deletions(-)


diff --git a/osaf/libs/core/include/ncs_tmr.h b/osaf/libs/core/include/ncs_tmr.h
--- a/osaf/libs/core/include/ncs_tmr.h
+++ b/osaf/libs/core/include/ncs_tmr.h
@@ -76,9 +76,6 @@ extern C {
uint32_t svc_sub_id;
} NCS_RP_TMR_INIT;
 
-#define m_IS_TIME_STAMP_SAME(dest_tmr, src_tmr) memcmp (dest_tmr, src_tmr, 
sizeof(time_t))
-#define m_RP_TMR_ALLOC(size, svc_id, sub_svc_id) m_NCS_MEM_ALLOC(size, 
NCS_MEM_REGION_PERSISTENT, svc_id, sub_svc_id)
-#define m_RP_TMR_FREE(ptr, svc_id, sub_svc_id) m_NCS_MEM_FREE(ptr, 
NCS_MEM_REGION_PERSISTENT, svc_id, sub_svc_id)
 
 #undef RP_LOG_ENB
 #ifdef RP_LOG_ENB
diff --git a/osaf/libs/core/leap/hj_tmr.c b/osaf/libs/core/leap/hj_tmr.c
--- a/osaf/libs/core/leap/hj_tmr.c
+++ b/osaf/libs/core/leap/hj_tmr.c
@@ -105,8 +105,7 @@ NCS_RP_TMR_CB *ncs_rp_tmr_init(NCS_RP_TM
 {
NCS_RP_TMR_CB *tmr_cb;
 
-   tmr_cb = (NCS_RP_TMR_CB *)m_RP_TMR_ALLOC(sizeof(NCS_RP_TMR_CB), 
tmr_init_info-svc_id,
-tmr_init_info-svc_sub_id);
+   tmr_cb = (NCS_RP_TMR_CB *)malloc(sizeof(NCS_RP_TMR_CB));
 
if (tmr_cb == NULL) {
m_RP_TMR_LOG_MSG(ncs_rp_tmr_init Os alloc failed, 0);
@@ -145,7 +144,7 @@ NCS_RP_TMR_HDL ncs_rp_tmr_create(NCS_RP_
NCS_RP_TMR_INFO *tmr_info;
 
/* allocate an leaf node and add it to the bucket */
-   tmr_info = (NCS_RP_TMR_INFO *)m_RP_TMR_ALLOC(sizeof(NCS_RP_TMR_INFO), 
tmr_cb-svc_id, tmr_cb-svc_sub_id);
+   tmr_info = (NCS_RP_TMR_INFO *)malloc(sizeof(NCS_RP_TMR_INFO));
 
if (tmr_info == NULL) {
m_RP_TMR_LOG_MSG(ncs_rp_tmr_start NCS_RP_TMR_INFO OS alloc 
failed, 0);
@@ -403,7 +402,7 @@ uint32_t ncs_rp_tmr_delete(NCS_RP_TMR_CB
m_RP_TMR_LOG_MSG(ncs_rp_tmr_delete timer timer is not 
stoped, tmr_info);
ncs_rp_tmr_stop(tmr_cb, tmr_id);
}
-   m_RP_TMR_FREE(tmr_info, tmr_cb-svc_id, tmr_cb-svc_sub_id);
+   free(tmr_info);
} while (0);
m_NCS_UNLOCK(tmr_cb-tmr_lock, NCS_LOCK_WRITE);
return (res);
@@ -440,7 +439,7 @@ uint32_t ncs_rp_tmr_destory(NCS_RP_TMR_C
pres_tmr_info = tmr_info;
for (; tmr_info != NULL;) {
tmr_info = tmr_info-pnext;
-   m_RP_TMR_FREE(pres_tmr_info, tmr_cb-svc_id, 
tmr_cb-svc_sub_id);
+   free(pres_tmr_info);
pres_tmr_info = tmr_info;
}
 
@@ -449,7 +448,7 @@ uint32_t ncs_rp_tmr_destory(NCS_RP_TMR_C
/* destroy the lock */
m_NCS_LOCK_DESTROY(tmr_cb-tmr_lock);
/* free the RP control block */
-   m_RP_TMR_FREE(tmr_cb, tmr_cb-svc_id, tmr_cb-svc_sub_id);
+   free(tmr_cb);
*pptmr_cb = NULL;
return (NCSCC_RC_SUCCESS);
 }

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 08 of 16] base: Deleted sysf_def.h file [#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/common/mqsv/include/mqsv.h|1 -
 osaf/libs/core/leap/hj_edp.c|   53 +++---
 osaf/libs/core/leap/hj_edu.c|   29 +-
 osaf/libs/core/leap/include/Makefile.am |1 -
 osaf/libs/core/leap/include/sysf_def.h  |  274 
--
 osaf/libs/core/leap/sysf_def.c  |1 -
 osaf/libs/core/leap/sysf_mem.c  |1 -
 osaf/libs/core/leap/sysf_tmr.c  |1 -
 8 files changed, 40 insertions(+), 321 deletions(-)


diff --git a/osaf/libs/common/mqsv/include/mqsv.h 
b/osaf/libs/common/mqsv/include/mqsv.h
--- a/osaf/libs/common/mqsv/include/mqsv.h
+++ b/osaf/libs/common/mqsv/include/mqsv.h
@@ -72,7 +72,6 @@
 #include stdlib.h
 
 /* From /leap/os_svcs/leap_basic/inc */
-#include sysf_def.h
 #include mqsv_common.h
 #include ncs_util.h
 
diff --git a/osaf/libs/core/leap/hj_edp.c b/osaf/libs/core/leap/hj_edp.c
--- a/osaf/libs/core/leap/hj_edp.c
+++ b/osaf/libs/core/leap/hj_edp.c
@@ -32,7 +32,6 @@
 #include ncssysf_mem.h
 #include ncsencdec_pub.h
 #include ncs_edu.h
-#include sysf_def.h
 #include ncs_ubaid.h
 
 extern char gl_log_string[];
@@ -80,7 +79,7 @@ uint32_t ncs_edp_ncs_bool(EDU_HDL *hdl, 
if (*(bool **)ptr == NULL) {
/* Since ncs_edp_ncs_bool is the 
responsibility of LEAP, LEAP
   is supposed to malloc this memory. */
-   (*(bool **)ptr) = uptr = m_MMGR_ALLOC_EDP_bool;
+   (*(bool **)ptr) = uptr = (bool 
*)malloc(sizeof(bool));
if (uptr == NULL) {
/* Memory failure. */
*o_err = EDU_ERR_MEM_FAIL;
@@ -114,7 +113,7 @@ uint32_t ncs_edp_ncs_bool(EDU_HDL *hdl, 
/* We need populate the pointer here, so that 
it can
   be sent back to the parent invoker(most 
likely
   to be able to perform the TEST condition). */
-   uptr = m_MMGR_ALLOC_EDP_bool;
+   uptr = (bool*)malloc(sizeof(bool));
if (uptr == NULL) {
/* Memory failure. */
*o_err = EDU_ERR_MEM_FAIL;
@@ -222,7 +221,7 @@ uint32_t ncs_edp_uns8(EDU_HDL *hdl, EDU_
if (*(uint8_t **)ptr == NULL) {
/* Since ncs_edp_uns8 is the responsibility 
of LEAP, LEAP
   is supposed to malloc this memory. */
-   (*(uint8_t **)ptr) = uptr = 
m_MMGR_ALLOC_EDP_UNS8(len);
+   (*(uint8_t **)ptr) = uptr = 
malloc((len)*sizeof(uint8_t));
if (uptr == NULL) {
/* Memory failure. */
*o_err = EDU_ERR_MEM_FAIL;
@@ -278,7 +277,7 @@ uint32_t ncs_edp_uns8(EDU_HDL *hdl, EDU_
len |= (uint16_t)*(p8)++;
}
 
-   uptr = m_MMGR_ALLOC_EDP_UNS8(len);
+   uptr = malloc((len)*sizeof(uint8_t));
if (uptr == NULL) {
/* Memory failure. */
*o_err = EDU_ERR_MEM_FAIL;
@@ -395,7 +394,7 @@ uint32_t ncs_edp_uns16(EDU_HDL *hdl, EDU
if (*(uint16_t **)ptr == NULL) {
/* Since ncs_edp_uns16 is the responsibility 
of LEAP, LEAP
   is supposed to malloc this memory. */
-   (*(uint16_t **)ptr) = uptr = 
m_MMGR_ALLOC_EDP_UNS8(sizeof(uint16_t) * len);
+   (*(uint16_t **)ptr) = uptr = 
malloc((sizeof(uint16_t) * len)*sizeof(uint8_t));
if (uptr == NULL) {
/* Memory failure. */
*o_err = EDU_ERR_MEM_FAIL;
@@ -444,7 +443,7 @@ uint32_t ncs_edp_uns16(EDU_HDL *hdl, EDU
len |= (uint16_t)*(p8)++;
}
 
-   uptr = m_MMGR_ALLOC_EDP_UNS8(sizeof(uint16_t) * len);
+   uptr = malloc((sizeof(uint16_t) * len)*sizeof(uint8_t));
if (uptr == NULL) {
/* Memory failure. */
*o_err = EDU_ERR_MEM_FAIL;
@@ -550,7 +549,7 @@ uint32_t ncs_edp_uns32(EDU_HDL *hdl, EDU
if (*(uint32_t **)ptr == NULL) {
/* Since ncs_edp_uns32 is the responsibility 
of LEAP, LEAP
   is supposed to malloc this memory. */
-   (*(uint32_t **)ptr) = uptr = 
m_MMGR_ALLOC_EDP_UNS8(4 * len);
+ 

[devel] [PATCH 04 of 16] base: Removed unsed macro's from ncs_edu.h[#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/core/leap/include/ncs_edu.h |  9 -
 1 files changed, 0 insertions(+), 9 deletions(-)


diff --git a/osaf/libs/core/leap/include/ncs_edu.h 
b/osaf/libs/core/leap/include/ncs_edu.h
--- a/osaf/libs/core/leap/include/ncs_edu.h
+++ b/osaf/libs/core/leap/include/ncs_edu.h
@@ -42,15 +42,6 @@
 
 #include ncs_edu_pub.h
 
-#define m_NCS_EDU_ASSERTassert(0)
-
-/* EDU Protocol Marker used in EDU header */
-#define EDU_PROT_MARKER 0xed
-
-/* Bitmap for EDU-options in the EDU-header */
-#define EDU_UBUF_USE_DIFF_EDP   0x01
-#define EDU_ALLOW_PARTIAL_DECODE0x02   /* Allows one-time partial 
-  decode of USRBUF */
 
 /* TLV Header size(for Type and Length) */
 #define EDU_TLV_HDR_SIZE3

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 10 of 16] base: Removed unused macros from sysf_ipc.h file. [#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/core/leap/include/sysf_ipc.h |  23 +--
 osaf/libs/core/leap/sysf_ipc.c |   6 --
 2 files changed, 1 insertions(+), 28 deletions(-)


diff --git a/osaf/libs/core/leap/include/sysf_ipc.h 
b/osaf/libs/core/leap/include/sysf_ipc.h
--- a/osaf/libs/core/leap/include/sysf_ipc.h
+++ b/osaf/libs/core/leap/include/sysf_ipc.h
@@ -41,25 +41,10 @@
 
 /*@
 
-HJ Internal Messaging Facility Definitions
+Internal Messaging Facility Definitions
 
 @*/
 
-/**
- **
- ** Posting Events or IPC Messages.
- **
- ** The set of macros provided here can be modified at integration time to 
- ** make use of a Target System's IPC or Queueing facilities already in 
- ** existance.
- **
- **/
-
-#define m_NCS_SM_IPC_ELEM_ADD(a)
-#define m_NCS_SM_IPC_ELEM_DEL(a)
-#define m_NCS_SM_IPC_ELEM_CUR_DEPTH_INC(a)
-#define m_NCS_SM_IPC_ELEM_CUR_DEPTH_DEC(a)
-
 typedef struct ncs_ipc_queue {
NCS_IPC_MSG *head;
NCS_IPC_MSG *tail;
@@ -103,10 +88,4 @@ typedef struct tag_ncs_ipc {
char *name; /* mbx task name */
 } NCS_IPC;
 
-#define m_NCS_SYSM_LM_OP_IPC_LBGN(info)   NCSCC_RC_FAILURE
-#define m_NCS_SYSM_LM_OP_IPC_LTCY(info)   NCSCC_RC_FAILURE
-
-#define m_NCS_SET_ST_QLAT()
-#define m_NCS_SET_FN_QLAT()
-
 #endif   /* SYSF_IPC_H */
diff --git a/osaf/libs/core/leap/sysf_ipc.c b/osaf/libs/core/leap/sysf_ipc.c
--- a/osaf/libs/core/leap/sysf_ipc.c
+++ b/osaf/libs/core/leap/sysf_ipc.c
@@ -97,7 +97,6 @@ uint32_t ncs_ipc_create(SYSF_MBX *mbx)
 
ncs_ipc-active_queue = 0;
 
-   m_NCS_SM_IPC_ELEM_ADD(ncs_ipc);
return rc;
 }
 
@@ -131,7 +130,6 @@ static uint32_t ipc_flush(NCS_IPC *ncs_i
cur_queue-tail = p_prev;
}
 
-   m_NCS_SM_IPC_ELEM_CUR_DEPTH_DEC(ncs_ipc);
ipc_dequeue_ind_processing(ncs_ipc, ind);
}
msg = p_next;
@@ -200,7 +198,6 @@ uint32_t ncs_ipc_release(SYSF_MBX *mbx, 
m_NCS_SEL_OBJ_RMV_OPERATION_SHUT(ncs_ipc-sel_obj);
 
m_NCS_LOCK_DESTROY(ncs_ipc-queue_lock);
-   m_NCS_SM_IPC_ELEM_DEL(ncs_ipc);
 
if (ncs_ipc-name != NULL)
m_NCS_MEM_FREE(ncs_ipc-name, NCS_MEM_REGION_PERSISTENT, 
NCS_SERVICE_ID_OS_SVCS, 1);
@@ -375,15 +372,12 @@ static NCS_IPC_MSG *ncs_ipc_recv_common(
/* get item from head of (ACTIVE) queue... */
for (active_queue = 0; active_queue  
NCS_IPC_PRIO_LEVELS; active_queue++) {
if ((msg = ncs_ipc-queue[active_queue].head) 
!= NULL) {
-   m_NCS_SET_FN_QLAT();
 
if ((ncs_ipc-queue[active_queue].head 
= msg-next) == NULL)

ncs_ipc-queue[active_queue].tail = NULL;
msg-next = NULL;
/* ncs_ipc-active_queue = active_queue 
^ 0x01; */
 
-   
m_NCS_SM_IPC_ELEM_CUR_DEPTH_DEC(ncs_ipc);
-
if (ipc_dequeue_ind_processing(ncs_ipc, 
active_queue) != NCSCC_RC_SUCCESS) {

m_NCS_UNLOCK(ncs_ipc-queue_lock, NCS_LOCK_WRITE);
ncshm_give_hdl((uint32_t)*mbx);

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 07 of 16] base: Deleted patricia.h file [#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/core/common/saf_edu.c |   2 +-
 osaf/libs/core/include/ncspatricia.h|   3 +++
 osaf/libs/core/leap/hj_edp.c|   2 +-
 osaf/libs/core/leap/hj_edu.c|   2 +-
 osaf/libs/core/leap/include/Makefile.am |   1 -
 osaf/libs/core/leap/include/patricia.h  |  39 
---
 osaf/libs/core/leap/patricia.c  |   2 +-
 osaf/libs/core/mds/mds_main.c   |   2 +-
 8 files changed, 8 insertions(+), 45 deletions(-)


diff --git a/osaf/libs/core/common/saf_edu.c b/osaf/libs/core/common/saf_edu.c
--- a/osaf/libs/core/common/saf_edu.c
+++ b/osaf/libs/core/common/saf_edu.c
@@ -30,7 +30,7 @@
 
 #include ncsgl_defs.h
 
-#include patricia.h
+#include ncspatricia.h
 #include ncsencdec_pub.h
 
 #include saAis.h
diff --git a/osaf/libs/core/include/ncspatricia.h 
b/osaf/libs/core/include/ncspatricia.h
--- a/osaf/libs/core/include/ncspatricia.h
+++ b/osaf/libs/core/include/ncspatricia.h
@@ -47,6 +47,9 @@ extern C {
 
 #include ncsgl_defs.h
 
+#define m_KEY_CMP(t, k1, k2) memcmp(k1, k2, (size_t)(t)-params.key_size)
+#define m_GET_BIT(key, bit)  ((bit  0) ? 0 : ((int)((*((key) + (bit  3))) 
 (7 - (bit  0x07)))  0x01))
+
typedef struct ncs_patricia_params {
int key_size;   /* 1..NCS_PATRICIA_MAX_KEY_SIZE - in OCTETS */
int info_size;  /* NOT USED!  Present for 
backward-compatibility only! */
diff --git a/osaf/libs/core/leap/hj_edp.c b/osaf/libs/core/leap/hj_edp.c
--- a/osaf/libs/core/leap/hj_edp.c
+++ b/osaf/libs/core/leap/hj_edp.c
@@ -28,7 +28,7 @@
 
 #include ncsgl_defs.h
 #include ncs_osprm.h
-#include patricia.h
+#include ncspatricia.h
 #include ncssysf_mem.h
 #include ncsencdec_pub.h
 #include ncs_edu.h
diff --git a/osaf/libs/core/leap/hj_edu.c b/osaf/libs/core/leap/hj_edu.c
--- a/osaf/libs/core/leap/hj_edu.c
+++ b/osaf/libs/core/leap/hj_edu.c
@@ -31,7 +31,7 @@
 #include ncssysf_def.h
 #include ncssysf_mem.h
 #include sysf_def.h
-#include patricia.h
+#include ncspatricia.h
 #include ncssysfpool.h
 #include ncsencdec_pub.h
 #include ncs_edu.h
diff --git a/osaf/libs/core/leap/include/Makefile.am 
b/osaf/libs/core/leap/include/Makefile.am
--- a/osaf/libs/core/leap/include/Makefile.am
+++ b/osaf/libs/core/leap/include/Makefile.am
@@ -22,7 +22,6 @@ noinst_HEADERS = \
ncsdlib.h \
ncs_edu.h \
ncs_hdl.h \
-   patricia.h \
sysf_def.h \
sysf_exc_scr.h \
sysf_ipc.h \
diff --git a/osaf/libs/core/leap/include/patricia.h 
b/osaf/libs/core/leap/include/patricia.h
deleted file mode 100644
--- a/osaf/libs/core/leap/include/patricia.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*  -*- OpenSAF  -*-
- *
- * (C) Copyright 2008 The OpenSAF Foundation
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
- * under the GNU Lesser General Public License Version 2.1, February 1999.
- * The complete license can be accessed from the following location:
- * http://opensource.org/licenses/lgpl-license.php
- * See the Copying file included with the OpenSAF distribution for full
- * licensing terms.
- *
- * Author(s): Emerson Network Power
- *
- */
-
-/*
-
-  DESCRIPTION:
-
-  This module contains declarations pertaining to implementation of 
-  patricia tree search/add/delete functions.
-
-**
-*/
-
-/*
- * Module Inclusion Control...
- */
-#ifndef _PATRICIA_H_
-#define _PATRICIA_H_
-
-#include ncspatricia.h
-
-#define m_KEY_CMP(t, k1, k2) memcmp(k1, k2, (size_t)(t)-params.key_size)
-#define m_GET_BIT(key, bit)  ((bit  0) ? 0 : ((int)((*((key) + (bit  3))) 
 (7 - (bit  0x07)))  0x01))
-
-#endif
diff --git a/osaf/libs/core/leap/patricia.c b/osaf/libs/core/leap/patricia.c
--- a/osaf/libs/core/leap/patricia.c
+++ b/osaf/libs/core/leap/patricia.c
@@ -43,7 +43,7 @@
 #include ncs_osprm.h
 #include ncssysfpool.h
 #include ncssysf_def.h
-#include patricia.h
+#include ncspatricia.h
 
 const static uint8_t BitMasks[9] = {
0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff
diff --git a/osaf/libs/core/mds/mds_main.c b/osaf/libs/core/mds/mds_main.c
--- a/osaf/libs/core/mds/mds_main.c
+++ b/osaf/libs/core/mds/mds_main.c
@@ -35,7 +35,7 @@
 #include ncssysf_tmr.h
 #include mds_dl_api.h
 #include mds_core.h
-#include patricia.h
+#include ncspatricia.h
 #include mds_log.h
 #include ncs_main_pub.h
 #include mds_dt_tcp.h

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list

[devel] [PATCH 06 of 16] base: Deleted ncs_tasks.h file [#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/core/include/ncssysf_tmr.h   |5 +
 osaf/libs/core/leap/include/Makefile.am|1 -
 osaf/libs/core/leap/include/ncs_tasks.h|  139 
--
 osaf/libs/core/leap/include/sysf_exc_scr.h |6 +-
 osaf/libs/core/leap/os_defs.c  |1 -
 osaf/libs/core/leap/sysf_tmr.c |1 -
 6 files changed, 10 insertions(+), 143 deletions(-)


diff --git a/osaf/libs/core/include/ncssysf_tmr.h 
b/osaf/libs/core/include/ncssysf_tmr.h
--- a/osaf/libs/core/include/ncssysf_tmr.h
+++ b/osaf/libs/core/include/ncssysf_tmr.h
@@ -58,6 +58,11 @@ extern C {
 
extern uint32_t gl_tmr_milliseconds;
 
+
+#ifndef NCS_TMR_STACKSIZE
+#define NCS_TMR_STACKSIZE NCS_STACKSIZE_HUGE
+#endif
+
 /** Target system timer support functions...
  **/
 
diff --git a/osaf/libs/core/leap/include/Makefile.am 
b/osaf/libs/core/leap/include/Makefile.am
--- a/osaf/libs/core/leap/include/Makefile.am
+++ b/osaf/libs/core/leap/include/Makefile.am
@@ -22,7 +22,6 @@ noinst_HEADERS = \
ncsdlib.h \
ncs_edu.h \
ncs_hdl.h \
-   ncs_tasks.h \
patricia.h \
sysf_def.h \
sysf_exc_scr.h \
diff --git a/osaf/libs/core/leap/include/ncs_tasks.h 
b/osaf/libs/core/leap/include/ncs_tasks.h
deleted file mode 100644
--- a/osaf/libs/core/leap/include/ncs_tasks.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*  -*- OpenSAF  -*-
- *
- * (C) Copyright 2008 The OpenSAF Foundation
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
- * under the GNU Lesser General Public License Version 2.1, February 1999.
- * The complete license can be accessed from the following location:
- * http://opensource.org/licenses/lgpl-license.php
- * See the Copying file included with the OpenSAF distribution for full
- * licensing terms.
- *
- * Author(s): Emerson Network Power
- *
- */
-
-/*
-..
-
-..
-
-  D E S C R I P T I O N :
-
-  This module contains all task configuration information, including
-  priority, stack-size and task-name for all possible NetPlane tasks.
-  The idea is that there is one file to visit to both understand and
-  adjust any product thread value at compile time.
-
-  T A K E   N O T E :
-
-  This file has been set up in the LEAP 2.6 release. It may not be the
-  case that all subsystems have yet adopted the advertised task 
-  mnemonics called out below. It will take some time for all subsystems
-  to make the migration.
-
-  O V E R V I E W
-
-  WHO AND WHERE ARE TASKS CREATED
-
-  For the most part, NetPlane invokes m_NCS_TASK_CREATE outside of its base
-  code to create tasks. This is because task creation and destruction is 
-  considered a 'system' function that takes place in the context of the 
-  system's initialization and destruction sequence.
-
-  As such, NetPlane tasks are generally created in either demo code or 
-  powercode, which NetPlane classifies as 'editable' (adjustable).
-
-  TASK STACK SIZES
-
-  The stack sizes used below work for our test environments. Different OS's
-  may cause one to adjust these sizes. Relative size mnemonics are set up so
-  that if your OS/Compiler needs/uses more or less, you can adjust them all
-  at once.
-
-  TASK NAMES
-
-  Task names are here as much for convenience as for configuration. You
-  may wish to change them, but system behavior is not contingent on this
-  value in any way.
-
-  TASK PRIORITIES
-
-  NetPlane software TASKS cover the spectrum of system software:
-
-  A - There are low level system services such as LEAP TIMER and 
-  SYSF_IP services.
-
-  D - Management Plane services, such as NetPlane's CLI and MAB 
-  Services.
-
-  Roughly speaking, NetPlane task priorities are arranged highest (get
-  CPU if in READY queue) to lowest in that order: A, B, C and D.
-  
-  Once said, there are exceptions and there is no hard and fast rule, 
-  as different OSs mixed with different hardware platforms in monolith 
-  or distributed contexts will behave differently.
- 
-  As such, you may find reason to tweek the shipped settings, as 
-  reflected in this file at ship-time.
-
-  Note that all possible NetPlane tasks are listed here. This in no way
-  implies that these tasks are in fact running. Again, this is a system
-  initialization sequence responsibility.
-
-**
-*/
-
-/*
- * Module Inclusion Control...
- */
-#ifndef NCS_TASKS_H
-#define NCS_TASKS_H
-
-/*
- 
-   A )S Y S T E M   S E R V I C E S 
-

[devel] [PATCH 05 of 16] base: Removed MMGR macro's from ncs_hdl.h and replaced with malloc, free[#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/core/leap/hj_hdl.c  |  13 ++---
 osaf/libs/core/leap/include/ncs_hdl.h |  25 -
 2 files changed, 6 insertions(+), 32 deletions(-)


diff --git a/osaf/libs/core/leap/hj_hdl.c b/osaf/libs/core/leap/hj_hdl.c
--- a/osaf/libs/core/leap/hj_hdl.c
+++ b/osaf/libs/core/leap/hj_hdl.c
@@ -245,9 +245,9 @@ void ncshm_delete(void)
if ((unit = gl_hm.unit[i]) != NULL) {
for (j = 0; j  HM_BANK_CNT; j++) {
if (unit-cells[j] != NULL)
-   m_MMGR_FREE_HM_CELLS(unit-cells[j]);
+   free(unit-cells[j]);
}
-   m_MMGR_FREE_HM_UNIT(unit);
+   free(unit);
}
}
 
@@ -553,7 +553,7 @@ uint32_t hm_make_free_cells(HM_PMGR *pmg
/* first time this pool has been used ?? */
 
if (unit == NULL) {
-   if ((unit = m_MMGR_ALLOC_HM_UNIT) == NULL)
+   if ((unit = (HM_UNIT*) malloc(sizeof(HM_UNIT))) == NULL)
return m_LEAP_DBG_SINK(NCSCC_RC_FAILURE);
 
memset(unit, 0, sizeof(HM_UNIT));
@@ -570,8 +570,7 @@ uint32_t hm_make_free_cells(HM_PMGR *pmg
}
 
/* Now go make HM_CELL_CNT (4096) new cells */
-
-   if ((cells = m_MMGR_ALLOC_HM_CELLS) == NULL)
+   if ((cells = (HM_CELLS*) malloc(sizeof(HM_CELLS))) == NULL)
return m_LEAP_DBG_SINK(NCSCC_RC_FAILURE);
 
memset(cells, 0, sizeof(HM_CELLS));
@@ -622,7 +621,7 @@ HM_FREE *hm_target_cell(HM_HDL *hdl)
pmgr = gl_hm.pool[m_HM_POOL_ID((uint8_t)hdl-idx1)];   /* determine 
pool */
 
if ((unit = gl_hm.unit[hdl-idx1]) == NULL) {
-   if ((unit = m_MMGR_ALLOC_HM_UNIT) == NULL) {
+   if ((unit = (HM_UNIT*)  malloc(sizeof(HM_UNIT))) == NULL) {
m_LEAP_DBG_SINK(NULL);
return NULL;
}
@@ -632,7 +631,7 @@ HM_FREE *hm_target_cell(HM_HDL *hdl)
}
 
if ((cells = unit-cells[hdl-idx2]) == NULL) {
-   if ((cells = m_MMGR_ALLOC_HM_CELLS) == NULL) {
+   if ((cells = (HM_CELLS*) malloc(sizeof(HM_CELLS))) == NULL) {
m_LEAP_DBG_SINK(NULL);
return NULL;
}
diff --git a/osaf/libs/core/leap/include/ncs_hdl.h 
b/osaf/libs/core/leap/include/ncs_hdl.h
--- a/osaf/libs/core/leap/include/ncs_hdl.h
+++ b/osaf/libs/core/leap/include/ncs_hdl.h
@@ -282,31 +282,6 @@ typedef struct hm_core {
 #define m_HM_STAT_RMV_IN_USE(r,n)
 #endif
 
-/*** 
- * Required Memory Management Macros for Handle Manager
- ***/
-
-#define m_MMGR_ALLOC_HM_CELLS  (HM_CELLS*) 
m_NCS_MEM_ALLOC(sizeof(HM_CELLS),\
-   NCS_MEM_REGION_PERSISTENT, \
-   NCS_SERVICE_ID_COMMON, \
-   0)
-#define m_MMGR_ALLOC_HM_UNIT   (HM_UNIT*)  
m_NCS_MEM_ALLOC(sizeof(HM_UNIT),\
-   NCS_MEM_REGION_PERSISTENT, \
-   NCS_SERVICE_ID_COMMON, \
-   0)
-
-/* The Free cases */
-
-#define m_MMGR_FREE_HM_CELLS(p)m_NCS_MEM_FREE(p,\
-   NCS_MEM_REGION_PERSISTENT,   \
-   NCS_SERVICE_ID_COMMON,   \
-   0)
-
-#define m_MMGR_FREE_HM_UNIT(p) m_NCS_MEM_FREE(p,\
-   NCS_MEM_REGION_PERSISTENT,   \
-   NCS_SERVICE_ID_COMMON,   \
-   0)
-
 /***
  *
  * P r i v a t e  (i n t e r n a l)  H a n d l e   M g r   F u n c t i o n s

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 12 of 16] base: Removed unused macros/structs from ncs_svd.h[#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/core/include/ncs_svd.h |  73 
 1 files changed, 0 insertions(+), 73 deletions(-)


diff --git a/osaf/libs/core/include/ncs_svd.h b/osaf/libs/core/include/ncs_svd.h
--- a/osaf/libs/core/include/ncs_svd.h
+++ b/osaf/libs/core/include/ncs_svd.h
@@ -166,79 +166,6 @@ extern C {
 #define NCS_FMT_STR   3
 #define NCS_FMT_OCT   4
 
-/* put key in start state */
-
-#define m_SET_EMPTY_KEY(k) { k.svc=NCS_SERVICE_ID_DUMMY;k.type=0; \
- k.fmat=NCS_FMT_EMPTY;k.val.num=0; }
-
-/* test for unoccupied key */
-
-#define m_IS_KEY_EMPTY(k)  (k.fmat==NCS_FMT_EMPTY) ? true:false
-
-/* 32 bit Number */
-
-#define m_SET_NUM_KEY(k,s,t,v) { k.svc=s;k.type=t; \
- k.fmat=NCS_FMT_NUM;k.val.num=v; }
-#define m_GET_NUM_KEY(k,n) { m_KEY_CHK_FMT(k,NCS_FMT_NUM); \
- n = (uint32_t)k.val.num; }
-
-/* Handle (NCSCONTEXT) */
-
-#define m_SET_HDL_KEY(k,s,t,v) { k.svc=s;k.type=t; \
- k.fmat=NCS_FMT_HDL;k.val.hdl=v; }
-#define m_GET_HDL_KEY(k,h) { m_KEY_CHK_FMT(k,NCS_FMT_HDL); \
- h = k.val.hdl; }
-
-/* NULL terminated String */
-
-#define m_SET_STR_KEY(k,s,t,v) { m_KEY_CHK_SLEN(v); k.svc=s;k.type=t; \
- k.fmat=NCS_FMT_STR;  \
- strcpy((char*)k.val.str,(const char*)v); }
-
-#define m_GET_STR_KEY(k,s) { m_KEY_CHK_FMT(k,NCS_FMT_STR);s=k.val.str; 
}
-
-/* OctetString of length bytes */
-
-#define m_SET_OCT_KEY(k,s,t,l,v)   { m_KEY_CHK_LEN(l); k.svc=s;k.type=t; \
- k.fmat=NCS_FMT_OCT; k.val.oct.len = l;   \
- memcpy((void*)(k.val.oct.data),(const 
void *)v,l); }
-
-#define m_GET_OCT_KEY(k,o) { m_KEY_CHK_FMT(k,NCS_FMT_OCT); o = 
k.val.oct; }
-
-/
-
-  H  J   S u b s y s t e m   N a m e
-
- This data type is used as an identity scheme for naming. It is currently
- used in redundancy, were the PRIMARY and BACKUP instances of a redundant
- entity must go by the same name, but set to opposite roles.
-
-NOTE: is designed to be small (32 bits). Don't mess with this!!!
-*/
-
-   typedef struct ftcc_name {
-   uint8_t ncs_ss; /* entity type/subsystem; an NCS_SERVICE_ID 
value   */
-   uint8_t ncs_qual;   /* entity qualifier (ex. SIG = 
UNI31_NET, PNNI,etc. */
-   uint16_t ncs_inst;  /* some assigned value  
   */
-   } NCSSS_NAME;
-
-/
-
-  H  J   L o c k  D e s c r i p t o r
-
- This data type is used as a means of qualifying who is asking for a lock.
- It is used in Signalling. Its intent is to provide enough lock qualifying
- information so that an ambitious customer can decide which locks it
- actually wants to use and which are deemed 'low risk' and choose to ignore.
-
- If (some) customers didn't ask for it, it would not be done.
-*/
-
-   typedef struct ncs_lock_desc {
-   NCS_SERVICE_ID subsystem_id;/* Subsystem specific owner of 
this lock */
-   uint32_t lock_id;   /* maps to a subsys specific lock 
identifier */
-   uint32_t lock_type; /* This is one of NCS_LOCK_READ or 
NCS_LOCK_WRITE */
-   } NCS_LOCK_DESC;
 
 #ifdef  __cplusplus
 }

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 01 of 16] base: Deleted ncs_stack.h ncs_stack_pub.h hj_stack.c files[#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/common/edsv/include/eda.h |1 -
 osaf/libs/common/edsv/include/eds.h |1 -
 osaf/libs/core/common/saf_edu.c |1 -
 osaf/libs/core/include/Makefile.am  |1 -
 osaf/libs/core/include/ncs_stack_pub.h  |  156 
 osaf/libs/core/leap/Makefile.am |1 -
 osaf/libs/core/leap/hj_edp.c|1 -
 osaf/libs/core/leap/hj_edu.c|1 -
 osaf/libs/core/leap/hj_stack.c  |  483 
-
 osaf/libs/core/leap/include/Makefile.am |1 -
 osaf/libs/core/leap/include/ncs_stack.h |   92 ---
 osaf/libs/core/leap/sysf_mem.c  |5 -
 osaf/libs/core/mbcsv/include/mbcsv.h|1 -
 13 files changed, 0 insertions(+), 745 deletions(-)


diff --git a/osaf/libs/common/edsv/include/eda.h 
b/osaf/libs/common/edsv/include/eda.h
--- a/osaf/libs/common/edsv/include/eda.h
+++ b/osaf/libs/common/edsv/include/eda.h
@@ -25,7 +25,6 @@
 #include ncsft.h
 #include ncs_ubaid.h
 #include ncsencdec_pub.h
-#include ncs_stack.h
 #include ncs_lib.h
 
 #include mds_papi.h
diff --git a/osaf/libs/common/edsv/include/eds.h 
b/osaf/libs/common/edsv/include/eds.h
--- a/osaf/libs/common/edsv/include/eds.h
+++ b/osaf/libs/common/edsv/include/eds.h
@@ -26,7 +26,6 @@
 #include ncsft.h
 #include ncs_ubaid.h
 #include ncsencdec_pub.h
-#include ncs_stack.h
 #include ncs_lib.h
 
 /* From targsvcs/common/inc */
diff --git a/osaf/libs/core/common/saf_edu.c b/osaf/libs/core/common/saf_edu.c
--- a/osaf/libs/core/common/saf_edu.c
+++ b/osaf/libs/core/common/saf_edu.c
@@ -31,7 +31,6 @@
 #include ncsgl_defs.h
 
 #include patricia.h
-#include ncs_stack.h
 #include ncsencdec_pub.h
 
 #include saAis.h
diff --git a/osaf/libs/core/include/Makefile.am 
b/osaf/libs/core/include/Makefile.am
--- a/osaf/libs/core/include/Makefile.am
+++ b/osaf/libs/core/include/Makefile.am
@@ -37,7 +37,6 @@ noinst_HEADERS = \
ncs_queue.h \
ncs_saf.h \
ncs_sprr_papi.h \
-   ncs_stack_pub.h \
ncs_svd.h \
ncssysf_def.h \
ncssysf_ipc.h \
diff --git a/osaf/libs/core/include/ncs_stack_pub.h 
b/osaf/libs/core/include/ncs_stack_pub.h
deleted file mode 100644
--- a/osaf/libs/core/include/ncs_stack_pub.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*  -*- OpenSAF  -*-
- *
- * (C) Copyright 2008 The OpenSAF Foundation
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
- * under the GNU Lesser General Public License Version 2.1, February 1999.
- * The complete license can be accessed from the following location:
- * http://opensource.org/licenses/lgpl-license.php
- * See the Copying file included with the OpenSAF distribution for full
- * licensing terms.
- *
- * Author(s): Emerson Network Power
- *
- */
-
-/*
-..
-
-  
-
-..
-
-  DESCRIPTION:
- 
-
-**
-*/
-
-/*
- * Module Inclusion Control...
- */
-#ifndef NCS_STACK_PUB_H
-#define NCS_STACK_PUB_H
-
-#include ncsgl_defs.h
-#include ncs_ubaid.h
-
-#ifdef  __cplusplus
-extern C {
-#endif
-
-/***
- ***
- *
- *   N e t P l a n e   H J M E M _ A I D
- *
- ***
- ***/
-
-/***
- * ncsmem_aid : this little guy manages an arbitrary hunk of memory. It was
- * conceived in the context of managing stack space that is to 
- * be used for multiple ends. 
- *
- *  THE ISSUE SOLVED: The invoker of a service that takes an NCSMEM_AID 
- *pointer for an argument can control where that memory
- *comes from:
- * 
- *Stack : if the passed pointer is not NULL, get memory from
- *NCSMEM_AID via ncsmem_aid_alloc().
- *Heap  : if the passed pointer IS NULL, get memory from heap.
- *
- ***/
-/***
- *
- * NOTE: All allocs from NCSMEM_AID are guarenteed to start on 4 byte 
- *   boundaries, aligned with the originally passed 'space' pointer.
- ***/ 
typedef struct ncsmem_aid {
-
-   /* P R I V A T E fields should not be referenced by 

[devel] [PATCH 02 of 16] base: Deleted ncsft.h file[#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/common/edsv/include/eda.h |   1 -
 osaf/libs/common/edsv/include/eds.h |   1 -
 osaf/libs/core/leap/include/Makefile.am |   1 -
 osaf/libs/core/leap/include/ncsft.h |  73 

 osaf/libs/core/mbcsv/include/mbcsv.h|   1 -
 5 files changed, 0 insertions(+), 77 deletions(-)


diff --git a/osaf/libs/common/edsv/include/eda.h 
b/osaf/libs/common/edsv/include/eda.h
--- a/osaf/libs/common/edsv/include/eda.h
+++ b/osaf/libs/common/edsv/include/eda.h
@@ -22,7 +22,6 @@
 #include ncs_main_papi.h
 #include ncs_svd.h
 #include usrbuf.h
-#include ncsft.h
 #include ncs_ubaid.h
 #include ncsencdec_pub.h
 #include ncs_lib.h
diff --git a/osaf/libs/common/edsv/include/eds.h 
b/osaf/libs/common/edsv/include/eds.h
--- a/osaf/libs/common/edsv/include/eds.h
+++ b/osaf/libs/common/edsv/include/eds.h
@@ -23,7 +23,6 @@
 /* From /base/common/pubinc */
 #include ncs_svd.h
 #include usrbuf.h
-#include ncsft.h
 #include ncs_ubaid.h
 #include ncsencdec_pub.h
 #include ncs_lib.h
diff --git a/osaf/libs/core/leap/include/Makefile.am 
b/osaf/libs/core/leap/include/Makefile.am
--- a/osaf/libs/core/leap/include/Makefile.am
+++ b/osaf/libs/core/leap/include/Makefile.am
@@ -21,7 +21,6 @@ MAINTAINERCLEANFILES = Makefile.in
 noinst_HEADERS = \
ncsdlib.h \
ncs_edu.h \
-   ncsft.h \
ncs_hdl.h \
ncs_tasks.h \
patricia.h \
diff --git a/osaf/libs/core/leap/include/ncsft.h 
b/osaf/libs/core/leap/include/ncsft.h
deleted file mode 100644
--- a/osaf/libs/core/leap/include/ncsft.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*  -*- OpenSAF  -*-
- *
- * (C) Copyright 2008 The OpenSAF Foundation
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
- * under the GNU Lesser General Public License Version 2.1, February 1999.
- * The complete license can be accessed from the following location:
- * http://opensource.org/licenses/lgpl-license.php
- * See the Copying file included with the OpenSAF distribution for full
- * licensing terms.
- *
- * Author(s): Emerson Network Power
- *
- */
-
-/*
-..
-
-  MODULE NAME: NCSFT.H  (Harris  Jeffries Fault Tolerance.h)
-
-  REVISION HISTORY:
-
-  Date Version  Name  Description
-   ---    
-  02-27-98 1.00AHJ (PB)  Original
-
-..
-
-  DESCRIPTION:
-
-  This module contains declarations and structures related to Fault Tolerance
-  that are generic to all subsystems.
-
-***/
-
-/*
- * Module Inclusion Control...
- */
-#ifndef NCSFT_H
-#define NCSFT_H
-
-typedef uint32_t
- (*TRIGGER_CALLBACK) (uint16_t svc_id, uint32_t signal, void *entity_handle, 
void *api_ctxt);
-
-/*
- ***
- * NCSFT ROLES
- ***
- */
-#define NCSFT_ROLE_INIT  0
-#define NCSFT_ROLE_PRIMARY   1
-#define NCSFT_ROLE_BACKUP2
-#define NCSFT_ROLE_WARM_BOOT_BACKUP3
-#define NCSFT_ROLE_STANDALONE_ACTIVE 4
-
-#define NCSFT_ROLE_UNDEFINED 99
-
-/*
- ***
- * NCSFT BACKUP POLICIES
- ***
- */
-
-typedef enum ncsft_backup_policy {
-   NCSFT_DO_NOTHING = 1,
-   NCSFT_PENT_UP,
-   NCSFT_PIGGY_BACK,
-   NCSFT_SIDE_EFFECT
-} NCS_FT_BACKUP_POLICY;
-
-#endif
diff --git a/osaf/libs/core/mbcsv/include/mbcsv.h 
b/osaf/libs/core/mbcsv/include/mbcsv.h
--- a/osaf/libs/core/mbcsv/include/mbcsv.h
+++ b/osaf/libs/core/mbcsv/include/mbcsv.h
@@ -43,7 +43,6 @@
 
 #include ncs_svd.h
 #include usrbuf.h
-#include ncsft.h
 #include ncs_ubaid.h
 #include ncsencdec_pub.h
 

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 03 of 16] base: Deleted sysf_pat.h file[#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/core/leap/include/Makefile.am |   1 -
 osaf/libs/core/leap/include/sysf_pat.h  |  71 
---
 osaf/libs/core/leap/patricia.c  |   5 +-
 3 files changed, 2 insertions(+), 75 deletions(-)


diff --git a/osaf/libs/core/leap/include/Makefile.am 
b/osaf/libs/core/leap/include/Makefile.am
--- a/osaf/libs/core/leap/include/Makefile.am
+++ b/osaf/libs/core/leap/include/Makefile.am
@@ -27,5 +27,4 @@ noinst_HEADERS = \
sysf_def.h \
sysf_exc_scr.h \
sysf_ipc.h \
-   sysf_pat.h \
usrbuf.h
diff --git a/osaf/libs/core/leap/include/sysf_pat.h 
b/osaf/libs/core/leap/include/sysf_pat.h
deleted file mode 100644
--- a/osaf/libs/core/leap/include/sysf_pat.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*  -*- OpenSAF  -*-
- *
- * (C) Copyright 2008 The OpenSAF Foundation
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
- * under the GNU Lesser General Public License Version 2.1, February 1999.
- * The complete license can be accessed from the following location:
- * http://opensource.org/licenses/lgpl-license.php
- * See the Copying file included with the OpenSAF distribution for full
- * licensing terms.
- *
- * Author(s): Emerson Network Power
- *
- */
-
-/*
-..
-
-..
-
-  DESCRIPTION:
-
-  This module contains declarations related to target system Memory Mgmt
-  services specifically used by the HJ patricia tree library
-
-..
-*/
-
-/*
- * Module Inclusion Control...
- */
-#ifndef _SYSF_PAT_H_
-#define _SYSF_PAT_H_
-
-/*@
- @
- @   MEMORY MANAGER PRIMITIVES (MACROS)...
- @   Populate accordingly during portation.
- @
- @
- @  The following macros provide the front-end to the target system memory
- @  manager. These macros must be changed such that the desired operation is
- @  accomplished by using the target system memory manager primitives.
- @
- */
-
-/**
- ** NOTES:
- ** The arguments used by the m_MMGR_* macros defined below are as follows:
- ** p - a pointer
- **/
-
-/** Target defined macros for conventional release and allocation of
- ** data structures, link-lists, etc.
- **/
-#define m_MMGR_ALLOC_PATRICIA_STACK(size) \
-(NCS_PATRICIA_LEXICAL_STACK *)m_NCS_MEM_ALLOC(size, 
NCS_MEM_REGION_PERSISTENT, \
-NCS_SERVICE_ID_COMMON, 1)
-#define m_MMGR_FREE_PATRICIA_STACK(p) \
- m_NCS_MEM_FREE(p, NCS_MEM_REGION_PERSISTENT, \
-   NCS_SERVICE_ID_COMMON, 1)
-
-/*@
- @
- @FUNCTION PROTOTYPES
- @
- */
-
-#endif
diff --git a/osaf/libs/core/leap/patricia.c b/osaf/libs/core/leap/patricia.c
--- a/osaf/libs/core/leap/patricia.c
+++ b/osaf/libs/core/leap/patricia.c
@@ -44,7 +44,6 @@
 #include ncssysfpool.h
 #include ncssysf_def.h
 #include patricia.h
-#include sysf_pat.h
 
 const static uint8_t BitMasks[9] = {
0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff
@@ -158,7 +157,7 @@ unsigned int ncs_patricia_tree_init(NCS_
pTree-root_node.key_info = (uint8_t *)0;
pTree-root_node.bit = -1;
pTree-root_node.left = pTree-root_node.right = pTree-root_node;
-   if ((pTree-root_node.key_info = 
m_MMGR_ALLOC_PATRICIA_STACK(pTree-params.key_size)) == NULL) {
+   if ((pTree-root_node.key_info = (NCS_PATRICIA_LEXICAL_STACK 
*)malloc(pTree-params.key_size)) == NULL) {
return (unsigned int)m_LEAP_DBG_SINK(NCSCC_RC_FAILURE);
}
 
@@ -192,7 +191,7 @@ unsigned int ncs_patricia_tree_init(NCS_
 unsigned int ncs_patricia_tree_destroy(NCS_PATRICIA_TREE *const pTree)
 {
ncs_patricia_tree_clear(pTree);
-   m_MMGR_FREE_PATRICIA_STACK(pTree-root_node.key_info);
+   free(pTree-root_node.key_info);
return NCSCC_RC_SUCCESS;
 }
 

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 14 of 16] base: Removed unsued function definitions from usrbuf.h[#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/core/leap/include/usrbuf.h |  2 --
 1 files changed, 0 insertions(+), 2 deletions(-)


diff --git a/osaf/libs/core/leap/include/usrbuf.h 
b/osaf/libs/core/leap/include/usrbuf.h
--- a/osaf/libs/core/leap/include/usrbuf.h
+++ b/osaf/libs/core/leap/include/usrbuf.h
@@ -38,8 +38,6 @@
 /***
  * NCSUB_POOL holds all info associated with a particular USRBUF pool
  ***/
-uint32_t ncs_lbp_create(void);
-uint32_t ncs_lbp_destroy(void);
 
 typedef struct ncsub_pool {
bool busy;

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 00 of 16] Review Request for Clean up of dead code in base [#537]

2013-12-05 Thread ramesh . betham
Summary: Clean up unused code in base [#537]
Review request for Trac Ticket(s): 537
Peer Reviewer(s): Mathi, Anders Widell
Pull request to: 
Affected branch(es): default
Development branch: default


Impacted area   Impact y/n

 Docsn
 Build systemy
 RPM/packaging   n
 Configuration files n
 Startup scripts n
 SAF servicesn
 OpenSAF servicesn
 Core libraries  y
 Samples n
 Tests   n
 Other   n


Comments (indicate scope for each y above):
-
This patch deletes the unused/dead code to in base. 


changeset b0d56871186d8a97f2131f83fcf827048c107cd2
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 17:49:32 +0530

base: Deleted ncs_stack.h ncs_stack_pub.h hj_stack.c files[#537]

changeset 7be2759a1023bf915aa10fcc0221cc9e889a28b0
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 17:51:54 +0530

base: Deleted ncsft.h file[#537]

changeset dad744a421692549aa6dda5c72807fa30d04929a
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 17:52:50 +0530

base: Deleted sysf_pat.h file[#537]

changeset 32a98ce45ccdfd89f8ed18c3b0a80f2a0908ca04
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 17:53:39 +0530

base: Removed unsed macro's from ncs_edu.h[#537]

changeset bbb812476dd972c1cd03a056beeae960781b7a48
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 17:55:01 +0530

base: Removed MMGR macro's from ncs_hdl.h and replaced with
malloc,free[#537]

changeset dfe1c3cc52c8c5cb368db69aaa6b7ef12c2ce9c4
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 17:55:57 +0530

base: Deleted ncs_tasks.h file [#537]

changeset 4adaa1f162cf09f16fbfaa102f5be17f8c5a7e43
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 17:57:14 +0530

base: Deleted patricia.h file [#537]

changeset 575febd3754e3e9b78551d3b2902968bd2146dfd
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 17:58:34 +0530

base: Deleted sysf_def.h file [#537]

changeset 36ce1b7b5ca89857b22010c18254c46b82ec87de
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 17:59:30 +0530

base: Removed MMGR macro's from sysf_exc_scr.h and replaced with 
malloc,free
[#537]

changeset eb0f91da0b8c0c02d10e2fad1c970aaf73a8bdbd
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 18:00:25 +0530

base: Removed unused macros from sysf_ipc.h file. [#537]

changeset 938d48afeb6ef045e1ec6b85abd3f7a3c0d70a20
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 18:01:12 +0530

base: Removed unused macros from ncs_osprm.h, ncssysf_def.h and 
os_defs.h
files [#537]

changeset dd2c02224b30ec10535027543cc430f2bbd86a29
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 18:02:05 +0530

base: Removed unused macros/structs from ncs_svd.h[#537]

changeset cda006422f2ba7787c76ae86f4b6020df764131f
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 18:03:06 +0530

base: Removed unused macros from ncs_tmr.h [#537]

changeset a48c1ceaccff9268bf829aa66631371053c98b9b
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 18:04:11 +0530

base: Removed unsued function definitions from usrbuf.h[#537]

changeset 9e108ef0dafc4c302153f764a9a6f704acd50a88
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 18:05:09 +0530

base: Deleted ncs_mds_def.h file[#537]

changeset e9d5f2e96f1d1d775dff577ac346ea8daa08838a
Author: Ramesh ramesh.bet...@oracle.com
Date:   Thu, 05 Dec 2013 18:06:16 +0530

base: Removed unsed functions from ncs_main_pub.h [#537]


Testing Commands:
-
Bring up two controllers, do switch-overs and failovers.

Testing, Expected Results:
--
Should succeed.

Conditions of Submission:
-
Ack from Mathi.


Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 n  n
x86_64  y  y
powerpc n  n
powerpc64   n  n


Reviewer Checklist:
---
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your 

[devel] [PATCH 09 of 16] base: Removed MMGR macro's from sysf_exc_scr.h and replaced with malloc, free [#537]

2013-12-05 Thread ramesh . betham
 osaf/libs/core/leap/include/sysf_exc_scr.h |  10 --
 osaf/libs/core/leap/sysf_exc_scr.c |  10 +-
 2 files changed, 5 insertions(+), 15 deletions(-)


diff --git a/osaf/libs/core/leap/include/sysf_exc_scr.h 
b/osaf/libs/core/leap/include/sysf_exc_scr.h
--- a/osaf/libs/core/leap/include/sysf_exc_scr.h
+++ b/osaf/libs/core/leap/include/sysf_exc_scr.h
@@ -81,16 +81,6 @@ typedef struct sysf_execute_module_cb {
bool init;
 } SYSF_EXECUTE_MODULE_CB;
 
-#define m_MMGR_ALLOC_PRO_EXC  (SYSF_PID_LIST*) 
m_NCS_MEM_ALLOC(sizeof(SYSF_PID_LIST),\
-   NCS_MEM_REGION_PERSISTENT, \
-   NCS_SERVICE_ID_COMMON, \
-   0)
-
-#define m_MMGR_FREE_PRO_EXC(p) m_NCS_MEM_FREE(p,\
-   NCS_MEM_REGION_PERSISTENT,   \
-   NCS_SERVICE_ID_COMMON,   \
-   0)
-
 
 #ifndef NCS_EXEC_MOD_STACKSIZE
 #define NCS_EXEC_MOD_STACKSIZE NCS_STACKSIZE_HUGE
diff --git a/osaf/libs/core/leap/sysf_exc_scr.c 
b/osaf/libs/core/leap/sysf_exc_scr.c
--- a/osaf/libs/core/leap/sysf_exc_scr.c
+++ b/osaf/libs/core/leap/sysf_exc_scr.c
@@ -216,7 +216,7 @@ void ncs_exec_mod_hdlr(void)

ncs_patricia_tree_del(module_cb.pid_list,
  
(NCS_PATRICIA_NODE *)exec_pid);
 
-   m_MMGR_FREE_PRO_EXC(exec_pid);
+   free(exec_pid);

m_NCS_UNLOCK(module_cb.tree_lock, NCS_LOCK_WRITE);
 
} else {
@@ -300,7 +300,7 @@ void give_exec_mod_cb(int pid, uint32_t 
/* Remove entry from pat tree */
ncs_patricia_tree_del(module_cb.pid_list, 
(NCS_PATRICIA_NODE *)exec_pid);
 
-   m_MMGR_FREE_PRO_EXC(exec_pid);
+   free(exec_pid);
}
}
m_NCS_UNLOCK(module_cb.tree_lock, NCS_LOCK_WRITE);
@@ -330,7 +330,7 @@ uint32_t add_new_req_pid_in_list(NCS_OS_
if (module_cb.init == false)
return m_LEAP_DBG_SINK(NCSCC_RC_SUCCESS);
 
-   if (NULL == (list_entry = m_MMGR_ALLOC_PRO_EXC))
+   if (NULL == (list_entry = (SYSF_PID_LIST *) 
malloc(sizeof(SYSF_PID_LIST
return m_LEAP_DBG_SINK(NCSCC_RC_FAILURE);
 
list_entry-timeout_in_ms = req-i_timeout_in_ms;
@@ -344,7 +344,7 @@ uint32_t add_new_req_pid_in_list(NCS_OS_
m_NCS_LOCK(module_cb.tree_lock, NCS_LOCK_WRITE);
 
if (NCSCC_RC_SUCCESS != ncs_patricia_tree_add(module_cb.pid_list, 
(NCS_PATRICIA_NODE *)list_entry)) {
-   m_MMGR_FREE_PRO_EXC(list_entry);
+   free(list_entry);
return m_LEAP_DBG_SINK(NCSCC_RC_FAILURE);
}
 
@@ -479,7 +479,7 @@ uint32_t exec_mod_cb_destroy(void)
if (exec_pid-tmr_id != NULL)
m_NCS_TMR_DESTROY(exec_pid-tmr_id);
 
-   m_MMGR_FREE_PRO_EXC(exec_pid);
+   free(exec_pid);
}
 
if (ncs_patricia_tree_destroy(module_cb.pid_list) != 
NCSCC_RC_SUCCESS) {

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1 of 3] IMM: API support for NO_DANGLING flag [#49]

2013-12-05 Thread Zoran Milinkovic
 osaf/libs/agents/saf/imma/imma_om_api.c   |  36 +--
 osaf/libs/common/immsv/include/immpbe_dump.hh |   2 +-
 osaf/libs/common/immsv/include/immsv_api.h|   9 
 osaf/libs/saf/include/Makefile.am |   3 +-
 osaf/libs/saf/include/saImmOm_A_2_12.h|   2 +
 osaf/libs/saf/include/saImmOm_A_2_13.h|  60 +++
 osaf/libs/saf/libSaImm/Makefile.am|   2 +-
 7 files changed, 106 insertions(+), 8 deletions(-)


IMM API support for reference integrity (NO_DANGLING flag)

diff --git a/osaf/libs/agents/saf/imma/imma_om_api.c 
b/osaf/libs/agents/saf/imma/imma_om_api.c
--- a/osaf/libs/agents/saf/imma/imma_om_api.c
+++ b/osaf/libs/agents/saf/imma/imma_om_api.c
@@ -4173,7 +4173,7 @@ SaAisErrorT saImmOmClassCreate_2(SaImmHa
for (i = 0; attr != 0; attr = attrDefinitions[++i]) {
if (attr-attrName == NULL)  {
TRACE(NULL attrName , not allowed.);
-   TRACE_LEAVE();
+   TRACE_LEAVE();
return SA_AIS_ERR_INVALID_PARAM;
}
 
@@ -4181,21 +4181,47 @@ SaAisErrorT saImmOmClassCreate_2(SaImmHa
if(((attr-attrValueType != SA_IMM_ATTR_SANAMET )  
(attr-attrValueType != 
SA_IMM_ATTR_SASTRINGT))) {
TRACE(ERR_INVALID_PARAM: RDN '%s' must be of 
type SaNameT or SaStringT, attr-attrName);
-   TRACE_LEAVE();
+   TRACE_LEAVE();
return SA_AIS_ERR_INVALID_PARAM;
}
 
if(attr-attrFlags  SA_IMM_ATTR_MULTI_VALUE) {
TRACE(ERR_INVALID_PARAM: RDN '%s' can not be 
multivalued, attr-attrName);
TRACE_LEAVE();
-return SA_AIS_ERR_INVALID_PARAM;
-   }
+   return SA_AIS_ERR_INVALID_PARAM;
+   }
+
+   if(attr-attrFlags  SA_IMM_ATTR_NO_DANGLING) {
+   TRACE(ERR_INVALID_PARAM: RDN '%s' can not have 
NO_DANGLING flag, attr-attrName);
+   TRACE_LEAVE();
+   return SA_AIS_ERR_INVALID_PARAM;
+   }
+   }
+
+   if(attr-attrFlags  SA_IMM_ATTR_NO_DANGLING) {
+   if(classCategory == SA_IMM_CLASS_RUNTIME) {
+   TRACE(ERR_INVALID_PARAM: NO_DANGLING attribute 
'%s' cannot be defined for runtime class, attr-attrName);
+   TRACE_LEAVE();
+   return SA_AIS_ERR_INVALID_PARAM;
+   }
+
+   if(attr-attrValueType != SA_IMM_ATTR_SANAMET) {
+   TRACE(ERR_INVALID_PARAM: Attribute '%s' is 
flagged NO_DANGLING, must be of type SaNameT, attr-attrName);
+   TRACE_LEAVE();
+   return SA_AIS_ERR_INVALID_PARAM;
+   }
+
+   if(attr-attrFlags  SA_IMM_ATTR_RUNTIME) {
+   TRACE(ERR_INVALID_PARAM: Runtime attribute 
'%s' cannot have NO_DANGLING flag, attr-attrName);
+   TRACE_LEAVE();
+   return SA_AIS_ERR_INVALID_PARAM;
+   }
}
}
 
if (cb-is_immnd_up == false) {
TRACE_2(ERR_TRY_AGAIN: IMMND is DOWN);
-TRACE_LEAVE();
+   TRACE_LEAVE();
return SA_AIS_ERR_TRY_AGAIN;
}
 
diff --git a/osaf/libs/common/immsv/include/immpbe_dump.hh 
b/osaf/libs/common/immsv/include/immpbe_dump.hh
--- a/osaf/libs/common/immsv/include/immpbe_dump.hh
+++ b/osaf/libs/common/immsv/include/immpbe_dump.hh
@@ -31,7 +31,7 @@
 
 #define RELEASE_CODE 'A'
 #define MAJOR_VERSION 2
-#define MINOR_VERSION 12
+#define MINOR_VERSION 13
 
 /* Prototypes */
 typedef std::mapstd::string, SaImmAttrFlagsT AttrMap;
diff --git a/osaf/libs/common/immsv/include/immsv_api.h 
b/osaf/libs/common/immsv/include/immsv_api.h
--- a/osaf/libs/common/immsv/include/immsv_api.h
+++ b/osaf/libs/common/immsv/include/immsv_api.h
@@ -76,6 +76,15 @@ extern C {
 #define OPENSAF_IMM_REPL_B_NAME @OpenSafImmReplicatorB
 
 /* Used internally in the SaImmCcbFlagsT space to indicate that
+   a ccb currently contains at lest one operation that either
+   a) creates an object with no dangling attribute(s) (that is/are not empty).
+   b) deletes an object that has no dangling attribute(s) (that are not empty).
+   c) modifies a NO_DANGLING attribute,
+   d) deletes an object that is referred to by some NO_DANGLING attribute.
+*/
+#define OPENSAF_IMM_CCB_NO_DANGLING_MUTATE 0x4000
+
+/* Used internally in the SaImmCcbFlagsT space to indicate that
a ccb 

Re: [devel] [PATCH 1 of 1] nid: Fix infinite loops when system calls fail [#645]

2013-12-05 Thread Ramesh Betham
Hi Anders,

Ack. Comments inline.
I hope some of these changes will reflect in later branches of 4.2.x 
i.e., on 4.3.x and default as well.

Thanks,
Ramesh.

On 12/5/2013 6:42 PM, Anders Widell wrote:
   osaf/services/infrastructure/nid/nodeinit.c |  9 +++--
   1 files changed, 7 insertions(+), 2 deletions(-)


 There were three loops in nodeinit.c that could potentially become infinite 
 if a
 system call returns -1. It is fine to try again when e.g. errno == EINTR, 
 since
 that is a temporary error that will go away eventually. In general however,
 trying again will not make the error go away and the loop would become 
 infinite.
 Also made a file descriptor non-blocking to avoid blocking indefinitely in
 read().

 diff --git a/osaf/services/infrastructure/nid/nodeinit.c 
 b/osaf/services/infrastructure/nid/nodeinit.c
 --- a/osaf/services/infrastructure/nid/nodeinit.c
 +++ b/osaf/services/infrastructure/nid/nodeinit.c
 @@ -46,6 +46,8 @@
   *any notification.  *
   /
   
 +#include unistd.h
 +#include fcntl.h
   #include syslog.h
   #include libgen.h
   #include ctype.h
 @@ -621,6 +623,8 @@ int32_t fork_daemon(NID_SPAWN_INFO *serv
   
   if(-1 == pipe(filedes))
   LOG_ER(Problem creating pipe: %s, strerror(errno));
 + else
 + fcntl(filedes[0], F_SETFL, fcntl(filedes[0], F_GETFL) | 
 O_NONBLOCK);
   
   if ((pid = fork()) == 0) {
   if (nis_fifofd  0)
 @@ -641,10 +645,10 @@ int32_t fork_daemon(NID_SPAWN_INFO *serv
   continue;
   else if (errno == EPIPE) {
   LOG_ER(Reader not available to return my PID);
 - exit(2);
   } else {
   LOG_ER(Problem writing to pipe, err=%s, 
 strerror(errno));
   }
 + exit(2);
[Ramesh]: How about retrying for fixed number of times for EAGAIN errno.
   }
   
   setsid();
 @@ -691,6 +695,7 @@ int32_t fork_daemon(NID_SPAWN_INFO *serv
   }
   if (errno == EINTR)
   continue;
 + break;
[Ramesh]: Below of this while-loop there is a while-loop for read(), in 
this case too can we consider for retry fixed number of times for EAGAIN 
errno.
   }
   
   while (read(filedes[0], tmp_pid, sizeof(int))  0)
 @@ -1002,7 +1007,7 @@ uint32_t spawn_wait(NID_SPAWN_INFO *serv
   LOG_ER(Timed-out for response from %s, 
 service-serv_name);
   return NCSCC_RC_FAILURE;
   }
 -
 + break;
   }
   
   /* Read the message from FIFO and fill in structure. */


--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1 of 1] amf : return ERR_NOT_SUPPORTED for unsupported feature in APIs [#170]

2013-12-05 Thread Nagendra Kumar
Ack

-Nagu

-Original Message-
From: Praveen Malviya 
Sent: 25 October 2013 16:30
To: hans.fe...@ericsson.com; Nagendra Kumar
Cc: opensaf-devel@lists.sourceforge.net
Subject: [PATCH 1 of 1] amf : return ERR_NOT_SUPPORTED for unsupported feature 
in APIs [#170]

 osaf/libs/agents/saf/amfa/ava_api.c |  10 +++---
 osaf/services/saf/amf/amfnd/cpm.cc  |   5 +
 2 files changed, 12 insertions(+), 3 deletions(-)


The patch will return ERR_NOT_SUPPORTED in following cases:
-saAmfInitialize_4() with the saAmfContainedComponentCleanupCallback or 
saAmfContainedComponentInstantiateCallback member filled up in callback 
structure.
-saAmfPmStart_3() is called with recovery not supported by AMF.
-saAmfResponse_4() with the response code SA_AIS_ERR_NOT_READY.

diff --git a/osaf/libs/agents/saf/amfa/ava_api.c 
b/osaf/libs/agents/saf/amfa/ava_api.c
--- a/osaf/libs/agents/saf/amfa/ava_api.c
+++ b/osaf/libs/agents/saf/amfa/ava_api.c
@@ -959,7 +959,7 @@ SaAisErrorT saAmfPmStart(SaAmfHandleT hd
}
 
/* input validation of Recomended recovery */
-   if (rec_Recovery  SA_AMF_NO_RECOMMENDATION || rec_Recovery  
SA_AMF_CLUSTER_RESET) {
+   if (rec_Recovery  SA_AMF_NO_RECOMMENDATION || rec_Recovery  
SA_AMF_CONTAINER_RESTART) {
TRACE_LEAVE2(Incorrect argument specified for 
SaAmfRecommendedRecoveryT);
return SA_AIS_ERR_INVALID_PARAM;
}
@@ -2005,8 +2005,8 @@ SaAisErrorT saAmfInitialize_4(SaAmfHandl
if ((reg_cbks != NULL) 
((reg_cbks-saAmfContainedComponentCleanupCallback != 0) ||
 (reg_cbks-saAmfContainedComponentInstantiateCallback != 0))) {
-   TRACE_4(SA_AIS_ERR_INVALID_PARAM: unsupported callbacks);
-   rc = SA_AIS_ERR_INVALID_PARAM;
+   TRACE_4(SA_AIS_ERR_NOT_SUPPORTED: unsupported callbacks);
+   rc = SA_AIS_ERR_NOT_SUPPORTED;
goto done;
}
 
@@ -2568,6 +2568,10 @@ SaAisErrorT saAmfResponse_4(SaAmfHandleT
rc = SA_AIS_ERR_NOT_SUPPORTED;
goto done;
}
+   if (error == SA_AIS_ERR_NOT_READY) {
+   rc = SA_AIS_ERR_NOT_SUPPORTED;
+   goto done;
+   }
}
 
rc = saAmfResponse(hdl, inv, error);
diff --git a/osaf/services/saf/amf/amfnd/cpm.cc 
b/osaf/services/saf/amf/amfnd/cpm.cc
--- a/osaf/services/saf/amf/amfnd/cpm.cc
+++ b/osaf/services/saf/amf/amfnd/cpm.cc
@@ -557,6 +557,11 @@ void avnd_comp_pm_param_val(AVND_CB *cb,
*o_amf_rc = SA_AIS_ERR_NOT_EXIST;
return;
}
+   if ((pm_start-rec_rcvr.saf_amf = 
SA_AMF_CLUSTER_RESET)  
+   (pm_start-rec_rcvr.saf_amf = 
SA_AMF_CONTAINER_RESTART)) {
+   *o_amf_rc = SA_AIS_ERR_NOT_SUPPORTED;
+   return;
+   }
}
break;
 

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1 of 1] amfnd : issue remove cbk to all comps when CSIs are unevenly distributed [#233]

2013-12-05 Thread Nagendra Kumar
Ack

-Nagu

-Original Message-
From: Praveen Malviya 
Sent: 29 October 2013 09:56
To: hans.fe...@ericsson.com; Nagendra Kumar
Cc: opensaf-devel@lists.sourceforge.net
Subject: [PATCH 1 of 1] amfnd : issue remove cbk to all comps when CSIs are 
unevenly distributed [#233]

 osaf/services/saf/amf/amfnd/comp.cc |  45 
 1 files changed, 20 insertions(+), 25 deletions(-)


When AMFND gets removal of assignments from AMFD, remove callbacks are issued 
with TARGET_ALL to first level CSIs in reverse order. When components respond 
back to AMFND, remove callbacks are issued for second level CSIs and so on. It 
is found that sometimes callbacks are not issued from second level onwards when 
CSIs are not distributed evenly among components. In such a case removal of 
assignment is not completed and AMFND never sends response to AMFD for removal. 
This patch ensures that remove callbacks are issued to all assigned comps in 
TARGET_ALL case.

diff --git a/osaf/services/saf/amf/amfnd/comp.cc 
b/osaf/services/saf/amf/amfnd/comp.cc
--- a/osaf/services/saf/amf/amfnd/comp.cc
+++ b/osaf/services/saf/amf/amfnd/comp.cc
@@ -1739,33 +1739,28 @@ uint32_t avnd_comp_csi_remove_done(AVND_
if (NCSCC_RC_SUCCESS != rc)
goto done;
}
-   } else {/* assign all the csis belonging to the prv 
rank in one shot */
-   /* get the first csi-record for this comp */
-   curr_csi = 
m_AVND_CSI_REC_FROM_COMP_DLL_NODE_GET(m_NCS_DBLIST_FIND_FIRST(comp-csi_list));
-   /* get the prv csi */
-   if (curr_csi) {
-find_next:
-   curr_csi = (AVND_COMP_CSI_REC 
*)m_NCS_DBLIST_FIND_PREV(curr_csi-si_dll_node);
-   if (curr_csi) {
-   if 
(m_AVND_COMP_CSI_CURR_ASSIGN_STATE_IS_REMOVED(curr_csi)) goto find_next;
+   } else {
+   /* Issue remove callback with TARGET_ALL for CSIs belonging to 
prv rank.*/
+   for (curr_csi = 
m_AVND_CSI_REC_FROM_COMP_DLL_NODE_GET(m_NCS_DBLIST_FIND_FIRST(comp-csi_list));
+   curr_csi;
+   curr_csi = 
m_AVND_CSI_REC_FROM_COMP_DLL_NODE_GET(m_NCS_DBLIST_FIND_NEXT(curr_csi-comp_dll_node)))
 {
+   for (AVND_COMP_CSI_REC *csi = (AVND_COMP_CSI_REC 
*)m_NCS_DBLIST_FIND_PREV(curr_csi-si_dll_node);
+   csi;
+   csi = (AVND_COMP_CSI_REC 
*)m_NCS_DBLIST_FIND_PREV(csi-si_dll_node)) {
+   if 
(m_AVND_COMP_CSI_CURR_ASSIGN_STATE_IS_REMOVED(csi)) 
+   continue;
+   else {
+   /* remove all the csis belonging to 
this comp */
+   rc = avnd_comp_csi_remove(cb, 
csi-comp, 0);
+   break;
+   }
}
}
-   else {
-   /* csi rec is already deleted, so SI rec would also 
have been deleted
-*  we are already done with rmv operation, just quit
-*/
-   goto done;
-   }
-
-   /* remove all the csis belonging to this comp */
-   if (curr_csi){
-   rc = avnd_comp_csi_remove(cb, curr_csi-comp, 0);
-   }
-   else {
-   /* su operation doone if all csis in all sis of su are 
in removed state*/
-   if(all_csis_in_removed_state(comp-su)) {
-   rc = avnd_su_si_oper_done(cb, comp-su, 0);
-   }
+
+   /* This is removal with TARGET_ALL. So if all CSIs in all SIs 
of SU are moved 
+  to removed state, mark all SIs removed and inform AMF 
director.*/
+   if (all_csis_in_removed_state(comp-su)  
m_AVND_SU_IS_ALL_SI(comp-su)) {
+   rc = avnd_su_si_oper_done(cb, comp-su, 0);
}
}
 

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel