From: Robert W. <wrw...@us...> - 2006-12-15 01:14:21
|
Update of /cvsroot/linuxisns/isnsNT/isnsserver/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4746/src Modified Files: iSNSInit.c iSNSLinux.c iSNSMain.c iSNSUtil.c iSNSdb.c iSNSdereg.c iSNSesi.c iSNSfsm.c iSNSparse.c iSNSquery.c iSNSqueue.c iSNSreg.c iSNSresponse.c iSNSscn.c Added Files: iSNSconfig.c Log Message: clean up global variables and create a global config Index: iSNSInit.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSInit.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** iSNSInit.c 6 Dec 2006 22:05:34 -0000 1.3 --- iSNSInit.c 15 Dec 2006 01:13:29 -0000 1.4 *************** *** 48,52 **** #include "iSNSbuffer.h" #include "iSNSreg.h" - #include "iSNSdebug.h" --- 48,51 ---- *************** *** 55,60 **** #endif - extern void ISNSInitDBTables(void); - STATUS SNSInit (ISNS_Entity sns_role) --- 54,57 ---- Index: iSNSUtil.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSUtil.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** iSNSUtil.c 14 Dec 2006 23:04:28 -0000 1.11 --- iSNSUtil.c 15 Dec 2006 01:13:29 -0000 1.12 *************** *** 43,52 **** #include "iSNSipc.h" #include "iSNSList.h" - - #ifdef SNS_DEBUG #include "iSNSdebug.h" - void SNSDisplay_Entity (SOIP_Entity *p_entity); - static char *p_name = "Port Name"; --- 43,48 ---- *************** *** 1165,1167 **** printf("\n"); } - #endif --- 1161,1162 ---- Index: iSNSquery.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSquery.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** iSNSquery.c 14 Dec 2006 23:04:28 -0000 1.9 --- iSNSquery.c 15 Dec 2006 01:13:29 -0000 1.10 *************** *** 49,66 **** #include "iSNStbl.h" #include "iSNSparse.h" - #include "iSNSdebug.h" - - #ifndef MAX_PARSE_ATTRS - #define MAX_PARSE_ATTRS 30 - #endif - /* Global */ ! int isns_query_debug=0; extern uint32_t isns_esi_interval; ! ! extern ISNS_ATTR_VALS_CB * ! ISNSAttrGetList (ISNS_Msg_Descp *p_md); /* --- 49,67 ---- #include "iSNStbl.h" #include "iSNSparse.h" #include "iSNSdebug.h" /* Global */ ! extern int isns_query_debug; extern uint32_t isns_esi_interval; ! extern uint32_t *dlist_src; /*[MAX_DD_PER_LIST];*/ ! extern uint32_t *dlist_node; /*[MAX_DD_PER_LIST];*/ ! extern SOIP_Dd_Member *ddmem; /* [100]; */ ! extern ISNS_LIST scn_list; ! extern ISNS_LIST scn_callback_list; ! extern ISNS_Msg *p_scn_msg_buffer; ! extern ISNS_Msg *p_scn_all_msg_buffer; ! extern ISNS_Msg_Descp *p_scn_md; ! extern ISNS_Msg_Descp *p_rspMd; ! extern dbStats iSNS_stats; /* *************** *** 76,93 **** static SOIP_DB_Entry entry5; ! extern uint32_t *dlist_src; /*[MAX_DD_PER_LIST];*/ ! extern uint32_t *dlist_node; /*[MAX_DD_PER_LIST];*/ ! extern SOIP_Dd_Member *ddmem; /* [100]; */ ! ! extern ISNS_LIST scn_list; ! extern ISNS_LIST scn_callback_list; ! ! extern ISNS_Msg *p_scn_msg_buffer; ! extern ISNS_Msg *p_scn_all_msg_buffer; ! extern ISNS_Msg_Descp *p_scn_md; ! extern ISNS_Msg_Descp *p_rspMd; ! ! extern dbStats iSNS_stats; ! static int SNSdbGetAttrNode (char **attr_indx, char **key_indx, ISNS_Msg_Descp * md, --- 77,81 ---- static SOIP_DB_Entry entry5; ! /* local prototypes */ static int SNSdbGetAttrNode (char **attr_indx, char **key_indx, ISNS_Msg_Descp * md, *************** *** 126,132 **** SNSdbGetAttrEntity (char **attr_indx, char **key_indx, ISNS_Attr * src_attr, ISNS_Msg_Descp * md, ISNS_Msg * p_rspmsg); - int - Check_Permission (ISNS_Attr *src_attr, int rectype, void * ptr); - /********************************************************************* --- 114,117 ---- Index: iSNSresponse.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSresponse.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** iSNSresponse.c 14 Dec 2006 23:04:28 -0000 1.5 --- iSNSresponse.c 15 Dec 2006 01:13:29 -0000 1.6 *************** *** 33,83 **** /* ! * This file contains source code for managing the ! * iSNS database. ! * */ #include "iSNS.h" - #include "iSNSdb.h" #include "iSNStypes.h" #include "iSNSmsg.h" - #include "iSNScomm.h" - #include "iSNSbuffer.h" - #include "iSNStbl.h" - #include "iSNSList.h" - #include "iSNSparse.h" - - #include "iSNSdebug.h" - - - #ifndef MAX_PARSE_ATTRS - #define MAX_PARSE_ATTRS 30 - #endif - - /* Global */ - extern int isns_db_debug; - - extern ISNS_ATTR_VALS_CB * - ISNSAttrGetList (ISNS_Msg_Descp *p_md); - - /* - * static common variables for gdbm fetches - * entry is for common registrations and queries - * scn_entry is for state change notifications - * opn_entry is for access control - */ - - uint32_t *dlist_src; /*[MAX_DD_PER_LIST];*/ - uint32_t *dlist_node; /*[MAX_DD_PER_LIST];*/ - SOIP_Dd_Member *ddmem; /* [100]; */ - - ISNS_LIST scn_list; - ISNS_LIST scn_callback_list; - - ISNS_Msg *p_scn_msg_buffer; - ISNS_Msg *p_scn_all_msg_buffer; - ISNS_Msg_Descp *p_scn_md; - ISNS_Msg_Descp *p_rspMd; - - dbStats iSNS_stats; /********************************************************************* --- 33,41 ---- /* ! * This file contains source code for managing the responses back to clients. */ #include "iSNS.h" #include "iSNStypes.h" #include "iSNSmsg.h" /********************************************************************* Index: iSNSesi.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSesi.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** iSNSesi.c 14 Dec 2006 23:04:28 -0000 1.6 --- iSNSesi.c 15 Dec 2006 01:13:29 -0000 1.7 *************** *** 48,60 **** #include "iSNStbl.h" #include "iSNSparse.h" - #include "iSNSdebug.h" ! /* Global */ ! int isns_esi_debug=0; ! ! int sns_esi_interval = SNS_ESI_INTERVAL; ! extern int sns_heartbeat_interval; /* --- 48,57 ---- #include "iSNStbl.h" #include "iSNSparse.h" #include "iSNSdebug.h" ! extern int isns_esi_debug; ! extern int sns_esi_interval; ! extern int esi_sent_limit; /* *************** *** 67,78 **** static SOIP_DB_Entry entry2; /* secondary fetches */ ! uint32_t *dlist_src; /*[MAX_DD_PER_LIST];*/ ! uint32_t *dlist_node; /*[MAX_DD_PER_LIST];*/ ! SOIP_Dd_Member *ddmem; /* [100]; */ ! ! ISNS_Msg *p_scn_msg_buffer; ! ISNS_Msg *p_scn_all_msg_buffer; ! ISNS_Msg_Descp *p_scn_md; ! ISNS_Msg_Descp *p_rspMd; /********************************************************************* --- 64,68 ---- static SOIP_DB_Entry entry2; /* secondary fetches */ ! ISNS_Msg_Descp *p_rspMd; /********************************************************************* *************** *** 138,142 **** DEBUG_1 (isns_esi_debug &1, esi_timer Timer Expired esiSend:%i,p_portal->esiSent); ! if ( p_portal->esiSent < 4 ) { DEBUG_1 (isns_esi_debug & 2, (Sending ESI to Entity %s), p_portal->entity_id.id); --- 128,132 ---- DEBUG_1 (isns_esi_debug &1, esi_timer Timer Expired esiSend:%i,p_portal->esiSent); ! if ( p_portal->esiSent < esi_sent_limit ) { DEBUG_1 (isns_esi_debug & 2, (Sending ESI to Entity %s), p_portal->entity_id.id); Index: iSNSparse.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSparse.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** iSNSparse.c 14 Dec 2006 23:27:50 -0000 1.13 --- iSNSparse.c 15 Dec 2006 01:13:29 -0000 1.14 *************** *** 38,56 **** #include "iSNSmsg.h" #include "iSNSparse.h" - - #ifdef SNS_DEBUG #include "iSNSdebug.h" - #endif ! #define MAX_PARSE_ATTRS 17 /*** local function prototypes ***/ - int SNSConvertPayloadNTOH (ISNS_Msg_Descp * p_md); - - /* updates msg_type based on rscn_type */ - - int sns_parse_debug = 0; - - static int ISNSProfileKeysAttr (ISNS_Msg * msg, --- 38,46 ---- #include "iSNSmsg.h" #include "iSNSparse.h" #include "iSNSdebug.h" ! extern int isns_parse_debug; /*** local function prototypes ***/ static int ISNSProfileKeysAttr (ISNS_Msg * msg, *************** *** 58,61 **** --- 48,54 ---- char **key_index, int *num_keys, ISNS_Attr **src_attr); + /************************************************************* + * ISNSParseMsg + *************************************************************/ int ISNSParseMsg (ISNS_Msg * msg, char **attr_index, char **key_index, *************** *** 139,143 **** if (len != ISNS_DELIMITER_SIZE) rval = FALSE; ! DEBUG_3 (sns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); break; /* Variable Length */ --- 132,136 ---- if (len != ISNS_DELIMITER_SIZE) rval = FALSE; ! DEBUG_3 (isns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); break; /* Variable Length */ *************** *** 156,162 **** if ( len == 0) ! DEBUG_3 (sns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); else ! DEBUG_4 (sns_parse_debug &1,%sTag:%i (%s) %s,src,tag,isnsTagText(tag),(char *)ptr); break; --- 149,155 ---- if ( len == 0) ! DEBUG_3 (isns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); else ! DEBUG_4 (isns_parse_debug &1,%sTag:%i (%s) %s,src,tag,isnsTagText(tag),(char *)ptr); break; *************** *** 168,172 **** rval = FALSE; ipaddrchar (ptr,ipaddr); ! DEBUG_4 (sns_parse_debug &1,%sTag:%i (%s) %s,src,tag,isnsTagText(tag),ipaddr); break; } --- 161,165 ---- rval = FALSE; ipaddrchar (ptr,ipaddr); ! DEBUG_4 (isns_parse_debug &1,%sTag:%i (%s) %s,src,tag,isnsTagText(tag),ipaddr); break; } *************** *** 174,178 **** if (len != ISNS_TIMESTAMP_SIZE && len != 0 ) rval = FALSE; ! DEBUG_3 (sns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); break; --- 167,171 ---- if (len != ISNS_TIMESTAMP_SIZE && len != 0 ) rval = FALSE; ! DEBUG_3 (isns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); break; *************** *** 208,214 **** rval = FALSE; if (len == 0) ! DEBUG_3 (sns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); else ! DEBUG_4 (sns_parse_debug &1,%sTag:%i (%s) %i,src,tag,isnsTagText(tag),*(uint32_t *)ptr); break; --- 201,207 ---- rval = FALSE; if (len == 0) ! DEBUG_3 (isns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); else ! DEBUG_4 (isns_parse_debug &1,%sTag:%i (%s) %i,src,tag,isnsTagText(tag),*(uint32_t *)ptr); break; *************** *** 220,226 **** rval = FALSE; if (len == 0) ! DEBUG_3 (sns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); else ! DEBUG_4 (sns_parse_debug &1,%sTag:%i (%s) %s,src,tag,isnsTagText(tag),(char *)ptr); break; --- 213,219 ---- rval = FALSE; if (len == 0) ! DEBUG_3 (isns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); else ! DEBUG_4 (isns_parse_debug &1,%sTag:%i (%s) %s,src,tag,isnsTagText(tag),(char *)ptr); break; *************** *** 253,263 **** case ISNS_FC_NODE_CERT: if (len == 0) ! DEBUG_3 (sns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); else ! DEBUG_4 (sns_parse_debug &1,%sTag:%i (%s) %i,src,tag,isnsTagText(tag),*(uint32_t *)ptr); break; default: ! DEBUG_1 (sns_parse_debug &1,(Tag not Defined:%i),tag); break; } --- 246,256 ---- case ISNS_FC_NODE_CERT: if (len == 0) ! DEBUG_3 (isns_parse_debug &1,%sTag:%i (%s),src,tag,isnsTagText(tag)); else ! DEBUG_4 (isns_parse_debug &1,%sTag:%i (%s) %i,src,tag,isnsTagText(tag),*(uint32_t *)ptr); break; default: ! DEBUG_1 (isns_parse_debug &1,(Tag not Defined:%i),tag); break; } *************** *** 265,269 **** if (!rval) ! DEBUG_0 (sns_parse_debug &1,(VerifyTag rval)); return (rval); --- 258,262 ---- if (!rval) ! DEBUG_0 (isns_parse_debug &1,(VerifyTag rval)); return (rval); *************** *** 291,295 **** } ! DEBUG_2 (sns_parse_debug &1,%s flags:%x,FuncIDText(msg->hdr.type),msg->hdr.flags); /* Store Keys */ --- 284,288 ---- } ! DEBUG_2 (isns_parse_debug &1,%s flags:%x,FuncIDText(msg->hdr.type),msg->hdr.flags); /* Store Keys */ *************** *** 315,319 **** { ! DEBUG_0 (sns_parse_debug &1, skip the error status field / timestamp); offset += 4; ptr = (struct ISNS_attr *)((char *) ptr + 4); --- 308,312 ---- { ! DEBUG_0 (isns_parse_debug &1, skip the error status field / timestamp); offset += 4; ptr = (struct ISNS_attr *)((char *) ptr + 4); *************** *** 369,373 **** } - /* updates msg_type based on rscn_type */ int SNSConvertPayloadNTOH (ISNS_Msg_Descp * msg) --- 362,365 ---- *************** *** 423,427 **** pattr->tag = ntohl (pattr->tag); } ! // if (sns_parse_debug) // printf ("%s:%d Processing msg type=0x%x (%u), tag=0x%x (%u).\n", // __FILE__, __LINE__, msg->msg.hdr.type, msg->msg.hdr.type, --- 415,419 ---- pattr->tag = ntohl (pattr->tag); } ! // if (isns_parse_debug) // printf ("%s:%d Processing msg type=0x%x (%u), tag=0x%x (%u).\n", // __FILE__, __LINE__, msg->msg.hdr.type, msg->msg.hdr.type, *************** *** 577,581 **** pattr->tag = ntohl (pattr->tag); } ! // if (sns_parse_debug) // { // printf ("%s:%d Processing msg type=0x%x (%u), tag=0x%x (%u).\n", --- 569,573 ---- pattr->tag = ntohl (pattr->tag); } ! // if (isns_parse_debug) // { // printf ("%s:%d Processing msg type=0x%x (%u), tag=0x%x (%u).\n", --- NEW FILE: iSNSconfig.c --- /*********************************************************************** Copyright (c) 2006, Novell, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Novell, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NISHAN SYSTEMS, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ #include "iSNS.h" /* Global Configuration Variables */ int sns_esi_interval = SNS_ESI_INTERVAL; int esi_sent_limit = 4; /* debug settings */ int isns_db_debug = 0; int isns_esi_debug = 0; int isns_reg_debug = 0; int isns_dereg_debug = 0; int isns_query_debug = 0; int isns_parse_debug = 0; int sns_fsm_debug = 0; /* state machine debugging */ int sns_bcast_debug = 0; /* broadcast debugging (except hb, scn) */ Index: iSNSdereg.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSdereg.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** iSNSdereg.c 14 Dec 2006 23:04:28 -0000 1.13 --- iSNSdereg.c 15 Dec 2006 01:13:29 -0000 1.14 *************** *** 50,69 **** #include "iSNStbl.h" #include "iSNSparse.h" - #include "iSNSdebug.h" - - #ifndef MAX_PARSE_ATTRS - #define MAX_PARSE_ATTRS 30 - #endif - /* Global */ ! int isns_dereg_debug;; extern uint32_t isns_esi_interval; ! ! extern ISNS_ATTR_VALS_CB * ! ISNSAttrGetList (ISNS_Msg_Descp *p_md); ! ! int Check_Permission (ISNS_Attr *src_attr, int rectype, void * ptr); /* --- 50,66 ---- #include "iSNStbl.h" #include "iSNSparse.h" #include "iSNSdebug.h" /* Global */ ! extern int isns_dereg_debug;; extern uint32_t isns_esi_interval; ! extern uint32_t *dlist_node; /*[MAX_DD_PER_LIST];*/ ! extern ISNS_LIST scn_list; ! extern ISNS_LIST scn_callback_list; ! extern ISNS_Msg *p_scn_msg_buffer; ! extern ISNS_Msg *p_scn_all_msg_buffer; ! extern ISNS_Msg_Descp *p_scn_md; ! extern ISNS_Msg_Descp *p_rspMd; ! extern dbStats iSNS_stats; /* *************** *** 79,95 **** static SOIP_DB_Entry entry5; - extern uint32_t *dlist_node; /*[MAX_DD_PER_LIST];*/ - - extern ISNS_LIST scn_list; - extern ISNS_LIST scn_callback_list; - - extern ISNS_Msg *p_scn_msg_buffer; - extern ISNS_Msg *p_scn_all_msg_buffer; - extern ISNS_Msg_Descp *p_scn_md; - extern ISNS_Msg_Descp *p_rspMd; - - - extern dbStats iSNS_stats; - /********************************************************************* _SNSdbRemoveAttr --- 76,79 ---- Index: iSNSfsm.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSfsm.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** iSNSfsm.c 13 Dec 2006 23:53:01 -0000 1.5 --- iSNSfsm.c 15 Dec 2006 01:13:29 -0000 1.6 *************** *** 42,51 **** #include "iSNSipc.h" #include "iSNStbl.h" - #include "iSNSdebug.h" - int sns_fsm_debug = 0; /* state machine debugging */ - int sns_bcast_debug = 0; /* broadcast debugging (except hb, scn) */ - extern int sns_hb_debug; extern int sns_comm_support; --- 42,51 ---- #include "iSNSipc.h" #include "iSNStbl.h" #include "iSNSdebug.h" + /* Globals */ + extern int sns_fsm_debug; /* state machine debugging */ + extern int sns_bcast_debug; /* broadcast debugging (except hb, scn) */ + extern int sns_hb_debug; extern int sns_comm_support; Index: iSNSreg.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSreg.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** iSNSreg.c 14 Dec 2006 23:04:28 -0000 1.13 --- iSNSreg.c 15 Dec 2006 01:13:29 -0000 1.14 *************** *** 50,66 **** #include "iSNStbl.h" #include "iSNSparse.h" - #include "iSNSdebug.h" - int Check_if_member_of_DD (char * id); - - #ifndef MAX_PARSE_ATTRS - #define MAX_PARSE_ATTRS 30 - #endif - /* Global */ ! int isns_reg_debug=0; ! int sns_esi_interval; ! /* --- 50,66 ---- #include "iSNStbl.h" #include "iSNSparse.h" #include "iSNSdebug.h" /* Global */ ! extern int isns_reg_debug; ! extern int sns_esi_interval; ! extern uint32_t *dlist_node; /*[MAX_DD_PER_LIST];*/ ! extern ISNS_LIST scn_list; ! extern ISNS_LIST scn_callback_list; ! extern ISNS_Msg *p_scn_msg_buffer; ! extern ISNS_Msg *p_scn_all_msg_buffer; ! extern ISNS_Msg_Descp *p_scn_md; ! extern ISNS_Msg_Descp *p_rspMd; ! extern dbStats iSNS_stats; /* *************** *** 74,89 **** static SOIP_DB_Entry entry3; ! extern uint32_t *dlist_node; /*[MAX_DD_PER_LIST];*/ ! ! extern ISNS_LIST scn_list; ! extern ISNS_LIST scn_callback_list; ! ! extern ISNS_Msg *p_scn_msg_buffer; ! extern ISNS_Msg *p_scn_all_msg_buffer; ! extern ISNS_Msg_Descp *p_scn_md; ! extern ISNS_Msg_Descp *p_rspMd; ! ! extern dbStats iSNS_stats; ! static int Add_ISCSINode_Default_DD (SOIP_Iscsi *p_node); --- 74,78 ---- static SOIP_DB_Entry entry3; ! int Check_if_member_of_DD (char * id); static int Add_ISCSINode_Default_DD (SOIP_Iscsi *p_node); Index: iSNSdb.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSdb.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** iSNSdb.c 14 Dec 2006 23:27:50 -0000 1.19 --- iSNSdb.c 15 Dec 2006 01:13:29 -0000 1.20 *************** *** 58,62 **** /* Global */ ! int isns_db_debug = 0; /* --- 58,62 ---- /* Global */ ! extern int isns_db_debug; /* Index: iSNSscn.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSscn.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** iSNSscn.c 13 Dec 2006 19:45:57 -0000 1.5 --- iSNSscn.c 15 Dec 2006 01:13:29 -0000 1.6 *************** *** 45,51 **** #include "iSNSList.h" #include "iSNSparse.h" ! #include "iSNSdebug.h" extern int sns_scn_debug; extern int sns_scn_msg_filter; --- 45,63 ---- #include "iSNSList.h" #include "iSNSparse.h" ! #include "iSNSquery.h" ! #include "iSNSresponse.h" ! #include "iSNSreg.h" #include "iSNSdebug.h" + /* Global */ + extern int isns_scn_msg_filter; + extern int isns_rsync_debug; + extern ISNS_LIST scn_list; + extern ISNS_LIST scn_callback_list; + extern ISNS_Msg *p_scn_msg_buffer; + extern ISNS_Msg *p_scn_all_msg_buffer; + extern ISNS_Msg_Descp *p_scn_md; + extern ISNS_Msg_Descp *p_rspMd; + extern dbStats iSNS_stats; extern int sns_scn_debug; extern int sns_scn_msg_filter; *************** *** 53,61 **** extern int SNSGetMgmtAddr (void); extern int sns_esi_interval; ! ! /* Global */ ! static int scn_xid = 1; ! extern int isns_scn_msg_filter; ! extern int isns_rsync_debug; /* --- 65,71 ---- extern int SNSGetMgmtAddr (void); extern int sns_esi_interval; ! extern uint32_t *dlist_src; /*[MAX_DD_PER_LIST];*/ ! extern uint32_t *dlist_node; /*[MAX_DD_PER_LIST];*/ ! extern SOIP_Dd_Member *ddmem; /* [100]; */ /* *************** *** 65,69 **** * opn_entry is for access control */ - static SOIP_DB_Entry scn_entry; static SOIP_DB_Entry scn_entry2; --- 75,78 ---- *************** *** 71,144 **** static SOIP_DB_Entry scn_entry4; ! uint32_t *dlist_src; /*[MAX_DD_PER_LIST];*/ ! uint32_t *dlist_node; /*[MAX_DD_PER_LIST];*/ ! SOIP_Dd_Member *ddmem; /* [100]; */ ! ! ISNS_LIST scn_list; ! ISNS_LIST scn_callback_list; ! ! ISNS_Msg *p_scn_msg_buffer; ! ISNS_Msg *p_scn_all_msg_buffer; ! ISNS_Msg_Descp *p_scn_md; ! ISNS_Msg_Descp *p_rspMd; ! ! dbStats iSNS_stats; ! ! /* ! * Local function prototypes ! */ ! int ! ISNSAppendAttr (ISNS_Msg * msg, int tag, int size, char *p_value, int value); ! ! int ! ISNSAppendKey (ISNS_Msg * msg, int tag, int size, char *p_value, int value); ! ! int ! ISNSAppendTimeStamp (ISNS_Msg *msg); ! ! ISNS_ATTR_VALS_CB * ! ISNSAttrGetList (ISNS_Msg_Descp *p_md); ! ! int ! SNSdbFetchDD (int id, SOIP_Dd ** p_dd, SOIP_DB_Entry * p_entry); ! ! int ! Copy_DD_List(ISNS_LIST *dd_list, ISNS_DD_LIST p_dlist); ! ! int ! Get_Active_DD_List (ISNS_LIST *dd_list, ISNS_DD_LIST p_dlist, int flag); ! ! int ! Get_Active_DD_List_From_ISCSI_Node (char *nodename, ISNS_DD_LIST p_dlist, ! int flag); ! int ! ISNSRemoveSCNEntry(uint32_t type, char *nodename); ! ! int ! ISNS_ProcessESI ( ISNS_Msg_Descp *p_md ); ! ! int ! ISNS_Process_SCN_Event (ISNS_Msg *p_msg); ! ! int ! ISNS_Process_SCN(ISNS_Msg_Descp *p_md, ISNS_Msg *p_rsp_msg); ! ! int ! Append_Nodes_From_DD_List (ISNS_DD_LIST p_dlist, ! SOIP_Dd_Member p_ddmem[], uint32_t type); ! ! int ! SNSdbFetchEntity (char *p_entity_id, SOIP_Entity ** p_entity, ! SOIP_DB_Entry * p_entry); ! ! int ! ISNSdbRead (ISNS_Key *key, SOIP_DB_Entry *entry); ! ! int ! ISNSdbWrite (ISNS_Key *key, SOIP_DB_Entry entry); ! ! int ! ISNSdbDelete (ISNS_Key *key); ! /********************************************************************* --- 80,84 ---- static SOIP_DB_Entry scn_entry4; ! static int scn_xid = 1; /********************************************************************* Index: iSNSqueue.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSqueue.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** iSNSqueue.c 2 Apr 2002 20:56:54 -0000 1.2 --- iSNSqueue.c 15 Dec 2006 01:13:29 -0000 1.3 *************** *** 39,48 **** * */ #include "iSNStypes.h" - #include "iSNSqueue.h" - #include "iSNS.h" ! int sns_retry_timeout = SNS_REQUEST_TIMEOUT; /* --- 39,47 ---- * */ + #include "iSNS.h" #include "iSNStypes.h" #include "iSNSqueue.h" ! static int sns_retry_timeout = SNS_REQUEST_TIMEOUT; /* Index: iSNSMain.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSMain.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** iSNSMain.c 13 Dec 2006 23:53:01 -0000 1.11 --- iSNSMain.c 15 Dec 2006 01:13:29 -0000 1.12 *************** *** 245,249 **** } #endif ! InitAllTables (); #ifndef SNS_LINUX if (loadFlag) --- 245,249 ---- } #endif ! //InitAllTables (); #ifndef SNS_LINUX if (loadFlag) Index: iSNSLinux.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSLinux.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** iSNSLinux.c 13 Dec 2006 19:45:57 -0000 1.10 --- iSNSLinux.c 15 Dec 2006 01:13:29 -0000 1.11 *************** *** 57,60 **** --- 57,61 ---- extern int sns_esi_interval; extern int sns_request_timeout; + extern int sns_comm_main_port_set; /* Linux */ *************** *** 68,81 **** extern pthread_mutex_t sns_esi_timer; int pauseFlag = FALSE; int snsServiceFlag = FALSE; - int loadFlag = FALSE; - extern int SNSMain(ISNS_Entity role); extern void SNSReqTimeoutHdlr(void); - extern void SNSFSMTimeoutHdlr(void); - extern void SNSESITimeoutHdlr(void); - extern int sns_comm_main_port_set; HANDLE init_ipc_rcv (void); --- 69,96 ---- extern pthread_mutex_t sns_esi_timer; + /* debug */ + extern int sns_bcast_debug; + extern int sns_cb_debug; + extern int sns_fsm_debug; + extern int sns_hb_debug; + extern int isns_main_debug; + extern int sns_recv_debug; + extern int sns_rsync_debug; + extern int sns_scn_debug; + extern int sns_comm_debug; + extern int isns_db_debug; + extern int isns_list_debug; + extern int isns_parse_debug; + extern int sns_tcp_debug; + extern int isns_query_debug; + extern int isns_reg_debug; + extern int isns_dereg_debug; + extern int isns_esi_debug; + int pauseFlag = FALSE; int snsServiceFlag = FALSE; extern void SNSReqTimeoutHdlr(void); HANDLE init_ipc_rcv (void); *************** *** 380,404 **** DebugOn (char * type) { - extern int sns_bcast_debug; - extern int sns_cb_debug; - extern int sns_fsm_debug; - extern int sns_hb_debug; - extern int isns_main_debug; - extern int sns_recv_debug; - extern int sns_rsync_debug; - extern int sns_scn_debug; - extern int sns_comm_debug; - extern int isns_db_debug; - extern int isns_list_debug; - extern int sns_parse_debug; - extern int sns_tcp_debug; - extern int isns_query_debug; - extern int isns_reg_debug; - extern int isns_dereg_debug; - extern int isns_esi_debug; if (!strcmp(type,"parse")) { ! sns_parse_debug = -1; isns_main_debug = -1; sns_comm_debug = -1; --- 395,402 ---- DebugOn (char * type) { if (!strcmp(type,"parse")) { ! isns_parse_debug = -1; isns_main_debug = -1; sns_comm_debug = -1; *************** *** 445,449 **** sns_rsync_debug = -1; sns_scn_debug = -1; ! sns_parse_debug = -1; sns_tcp_debug = -1; isns_list_debug = -1; --- 443,447 ---- sns_rsync_debug = -1; sns_scn_debug = -1; ! isns_parse_debug = -1; sns_tcp_debug = -1; isns_list_debug = -1; |