From: Robert W. <wrw...@us...> - 2006-12-19 22:25:35
|
Update of /cvsroot/linuxisns/isnsNT/isnsserver/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19280/src Modified Files: iSNSInit.c iSNSMain.c iSNSdereg.c iSNSquery.c iSNSscn.c Log Message: organize code in iSNSMain.c Index: iSNSInit.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSInit.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** iSNSInit.c 15 Dec 2006 01:13:29 -0000 1.4 --- iSNSInit.c 19 Dec 2006 22:25:31 -0000 1.5 *************** *** 54,57 **** --- 54,59 ---- #endif + char sns_errmsg[256]; + STATUS SNSInit (ISNS_Entity sns_role) Index: iSNSscn.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSscn.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** iSNSscn.c 18 Dec 2006 19:02:47 -0000 1.7 --- iSNSscn.c 19 Dec 2006 22:25:31 -0000 1.8 *************** *** 61,64 **** --- 61,66 ---- extern dbStats iSNS_stats; extern int sns_scn_debug; + extern int sns_cb_debug; + extern int sns_cb_msg_filter; extern int sns_scn_msg_filter; extern int sns_rsync_debug; *************** *** 82,85 **** --- 84,93 ---- static int scn_xid = 1; + static ISNS_ATTR_VALS_CB * + ISNSAttrGetList (ISNS_Msg_Descp *p_md); + + static void* + SNSAttrGetAttrValLocation (ISNS_Attr *sns_attr); + /********************************************************************* *********************************************************************/ *************** *** 1284,1285 **** --- 1292,1427 ---- } + static ISNS_ATTR_VALS_CB * + ISNSAttrGetList (ISNS_Msg_Descp *p_md) + { + ISNS_Key *p_key; + char *loc_ptr1; + uint16_t sns_attr_len; + ISNS_ATTR_VALS *p_aval; + ISNS_ATTR_VALS_CB *p_attr_vals_cb; + void *val_location; + int num_entries, ii; + int display_debug; + uint16_t len; + + display_debug = 0; + if ((sns_cb_debug == 3) && (p_md->msg.hdr.type != ISNS_SCN)) + display_debug = (sns_cb_msg_filter == p_md->msg.hdr.type); + + /* + * Initialize the vars and go to the start + * of the message.. + */ + p_aval = NULL; + p_attr_vals_cb = NULL; + len = 0; + + if (p_md->msg.hdr.type == ISNS_SCN) + { + /* No error Code */ + p_key = (ISNS_Key *)&p_md->msg.payload; + sns_attr_len = p_md->msg.hdr.msg_len; + } + else + { + /* Error Code */ + p_key = (ISNS_Key *)&p_md->msg.payload+ISNS_ERROR_CODE_SIZE; + sns_attr_len = p_md->msg.hdr.msg_len-ISNS_ERROR_CODE_SIZE; + } + DEBUG_1 (display_debug, (Attributes length : 0x%x), sns_attr_len); + + /* + * Go through the message's attributes and parse them into + * the Attribute list. NOTE: All the pointers are allocated + * here including the storage for the attribute values. + */ + num_entries = 0; + loc_ptr1 = (char *)p_key; + p_aval = (void *)ISNSAllocBuffer (sns_attr_len); + + while (((char *)loc_ptr1 - (char *)p_key) < sns_attr_len) + { + if (p_aval == NULL) + { + SNS_WARN(SNS_BUFFER_WARN, + "AttrGetList out of aval buffs (size)\n", + sns_attr_len, 0, 0); + return (NULL); + } + + /* Set the VALUE location for the attributes */ + val_location = SNSAttrGetAttrValLocation((ISNS_Attr *)loc_ptr1); + len = ((ISNS_Attr *)loc_ptr1)->len; + + if (val_location == NULL) + { + SNS_WARN(SNS_GETATTR_WARN, + "AttrGetList id not found (tag, msg id, xid)\n", + ((ISNS_Attr *)loc_ptr1)->tag, p_md->msg.hdr.type, + p_md->msg.hdr.xid); + ISNSFreeBuffer((char *)p_aval); + p_aval = NULL; + break; + } + + p_aval[num_entries].attr_id = ((ISNS_Attr *)loc_ptr1)->tag; + p_aval[num_entries].attr_len = len; + p_aval[num_entries].attr_val = val_location; + + /* Word Align values */ + if (len % 4) + len += 4 - (len % 4); + + /* Debugging */ + if ((sns_scn_debug == 3) && (p_md->msg.hdr.type == ISNS_SCN)) + { + if (p_aval[num_entries].attr_id == RSCN_EVENT) + display_debug = (sns_scn_msg_filter == + *(int *)p_aval[num_entries].attr_val); + } + DEBUG_2 (display_debug, (attr id %u, len %d), + p_aval[num_entries].attr_id, + p_aval[num_entries].attr_len); + if (display_debug) + { + for (ii = 0; ii < p_aval[num_entries].attr_len; ii++) + printf("%02x", *((char *)p_aval[num_entries].attr_val + ii)); + printf("\n"); + } + /* End Debugging */ + loc_ptr1 = (char *) loc_ptr1 + ISNS_SIZEOF_TAG + len; + num_entries++; + } + /* + * Set the attribute value control block. + */ + if (p_aval != NULL) + { + p_attr_vals_cb = (ISNS_ATTR_VALS_CB *) + ISNSAllocBuffer(sizeof (ISNS_ATTR_VALS_CB)); + + if (p_attr_vals_cb == NULL) + { + SNS_WARN(SNS_BUFFER_WARN, "AttrGetList out of cb buffs (size)\n", + (int)sizeof (ISNS_ATTR_VALS_CB), 0, 0); + } + else + { + p_attr_vals_cb->num_entries = num_entries; + p_attr_vals_cb->total_size = sns_attr_len; + p_attr_vals_cb->attr_val_sptr = p_aval; + } + } + return (p_attr_vals_cb); + } + + static void* + SNSAttrGetAttrValLocation (ISNS_Attr *sns_attr) + { + if (sns_attr->tag < ISNS_END_VALID_TAG) + { + return ((void *)&sns_attr->val); + } + + return (NULL); + } Index: iSNSdereg.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSdereg.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** iSNSdereg.c 19 Dec 2006 20:34:38 -0000 1.18 --- iSNSdereg.c 19 Dec 2006 22:25:31 -0000 1.19 *************** *** 83,87 **** *********************************************************************/ int ! ISNSdbRemoveAttr ( ISNS_Msg_Descp * p_md ) { ISNS_Attr *p_attr; --- 83,87 ---- *********************************************************************/ int ! ISNSdbRemoveAttr ( ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg) { ISNS_Attr *p_attr; *************** *** 163,168 **** } - memset (p_rspMd, 0, sizeof (ISNS_Msg_Descp)); - status = ISNS_NO_ERR; if (deregEnitityFlag) --- 163,166 ---- *************** *** 177,186 **** status = SNSdbRemoveAttrISCSI (attr_indx, (char *)src_attr, p_md, &p_rspMd->msg); - if (status == ISNS_NO_ERR) - { - memcpy (&p_md->msg.payload, &p_rspMd->msg.payload, p_rspMd->msg.hdr.msg_len); - p_md->msg.hdr.msg_len = p_rspMd->msg.hdr.msg_len; - } - return status; } --- 175,178 ---- Index: iSNSquery.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSquery.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** iSNSquery.c 18 Dec 2006 23:00:05 -0000 1.13 --- iSNSquery.c 19 Dec 2006 22:25:31 -0000 1.14 *************** *** 121,125 **** *********************************************************************/ int ! ISNSdbGetAttr ( ISNS_Msg_Descp *p_md, ISNS_Msg_Descp * md ) { int status = ISNS_UNKNOWN_ERR; --- 121,125 ---- *********************************************************************/ int ! ISNSdbGetAttr ( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ) { int status = ISNS_UNKNOWN_ERR; *************** *** 148,152 **** /* Search entity table */ status = SNSdbGetAttrEntity ( attr_indx, key_indx, ! (ISNS_Attr *)src_attr, NULL, &md->msg); break; --- 148,152 ---- /* Search entity table */ status = SNSdbGetAttrEntity ( attr_indx, key_indx, ! (ISNS_Attr *)src_attr, NULL, p_rspmsg); break; *************** *** 158,162 **** case ISNS_PORTAL_IDX: status = SNSdbGetAttrPortal ( attr_indx, key_indx, ! (ISNS_Attr *)src_attr, NULL, &md->msg ); break; --- 158,162 ---- case ISNS_PORTAL_IDX: status = SNSdbGetAttrPortal ( attr_indx, key_indx, ! (ISNS_Attr *)src_attr, NULL, p_rspmsg ); break; *************** *** 166,170 **** case ISNS_FC_NODE_IPA: case ISNS_FC_NODE_CERT: ! status = SNSdbGetAttrNode ( attr_indx, key_indx, NULL, &md->msg ); break; --- 166,170 ---- case ISNS_FC_NODE_IPA: case ISNS_FC_NODE_CERT: ! status = SNSdbGetAttrNode ( attr_indx, key_indx, NULL, p_rspmsg ); break; *************** *** 181,185 **** case ISNS_FC4_FEATURE: status = SNSdbGetAttrPort ( attr_indx, key_indx, ! (ISNS_Attr *)src_attr, NULL, &md->msg ); break; case ISNS_ISCSI_TYPE: --- 181,185 ---- case ISNS_FC4_FEATURE: status = SNSdbGetAttrPort ( attr_indx, key_indx, ! (ISNS_Attr *)src_attr, NULL, p_rspmsg ); break; case ISNS_ISCSI_TYPE: *************** *** 189,193 **** case ISNS_ISCSI_IDX: status = ISNSdbGetAttrISCSI ( attr_indx, key_indx, ! (ISNS_Attr *)src_attr, NULL, &md->msg ); break; --- 189,193 ---- case ISNS_ISCSI_IDX: status = ISNSdbGetAttrISCSI ( attr_indx, key_indx, ! (ISNS_Attr *)src_attr, NULL, p_rspmsg ); break; *************** *** 195,199 **** case ISNS_DDS_SYM_NAME: case ISNS_DDS_STATUS: ! status = SNSdbGetAttrDDS ( attr_indx, key_indx, (ISNS_Attr *)src_attr, NULL, &md->msg ); break; --- 195,199 ---- case ISNS_DDS_SYM_NAME: case ISNS_DDS_STATUS: ! status = SNSdbGetAttrDDS ( attr_indx, key_indx, (ISNS_Attr *)src_attr, NULL, p_rspmsg ); break; *************** *** 204,208 **** case ISNS_DD_FEATURE_BITMAP: case ISNS_DD_ACTIVE: ! status = SNSdbGetAttrDD ( attr_indx, key_indx, (ISNS_Attr *)src_attr, NULL, &md->msg ); break; --- 204,208 ---- case ISNS_DD_FEATURE_BITMAP: case ISNS_DD_ACTIVE: ! status = SNSdbGetAttrDD ( attr_indx, key_indx, (ISNS_Attr *)src_attr, NULL, p_rspmsg ); break; Index: iSNSMain.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSMain.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** iSNSMain.c 15 Dec 2006 01:13:29 -0000 1.12 --- iSNSMain.c 19 Dec 2006 22:25:31 -0000 1.13 *************** *** 39,43 **** */ #ifdef SNS_LINUX - /* Linux */ #include <sched.h> #include <sys/types.h> --- 39,42 ---- *************** *** 45,54 **** #include <sys/un.h> #include <unistd.h> - - /* - * This file contains source code for implementing the - * main processing loop for the SoIP service task. - * - */ #include "iSNSLinux.h" #endif --- 44,47 ---- *************** *** 68,79 **** #include "iSNSesi.h" #include "iSNSscn.h" - - #ifdef SNS_DEBUG #include "iSNSdebug.h" - #endif - - extern int sns_ready; - extern void ISNSNotReady (); - extern int loadFlag; ISNS_Entity isns_role = 0; --- 61,65 ---- *************** *** 88,99 **** int sns_scn_debug = 0; /* state change debugging */ int sns_rsync_debug = 0; /* resync debugging. 1-brief. 2-detail */ - extern int sns_fsm_debug; /* state machine debugging */ - extern int sns_bcast_debug; /* broadcast debugging (except hb, scn) */ - - char sns_errmsg[256]; - int sns_hb_counter = 0; int sns_cb_msg_filter = 0; int sns_scn_msg_filter = 0xf; /* init non-zero since 0 is FLOGI */ /* --- 74,84 ---- int sns_scn_debug = 0; /* state change debugging */ int sns_rsync_debug = 0; /* resync debugging. 1-brief. 2-detail */ int sns_hb_counter = 0; int sns_cb_msg_filter = 0; int sns_scn_msg_filter = 0xf; /* init non-zero since 0 is FLOGI */ + int sns_request_retries = SNS_REQUEST_RETRIES; + int sns_request_timeout = 0; + + extern int sns_fsm_timeout; /* *************** *** 108,118 **** extern pthread_mutex_t sns_esi_timer; #else void *sns_request_timer; #endif - int sns_request_retries = SNS_REQUEST_RETRIES; - int sns_request_timeout = 0; - - extern int sns_fsm_timeout; /* * the current main message descriptor being processed --- 93,101 ---- extern pthread_mutex_t sns_esi_timer; #else + DWORD junk; + DWORD request_id; void *sns_request_timer; #endif /* * the current main message descriptor being processed *************** *** 125,162 **** static ISNS_Msg_Descp query_md; - - /* - * External functions. - */ - extern void SNSReady (); - - extern void sns_pong (ISNS_Msg_Descp *); - /* * Local function prototypes. */ static void regCallback(ISNS_Msg_Descp* p_md); - - static void* - SNSAttrGetAttrValLocation (ISNS_Attr *sns_attr); - static void SNSProcessRequest (ISNS_Msg_Descp *); - void SNSReqTimeoutHdlr (void); - int SNSExecCallback (ISNS_Msg_Descp *, int status); - - ISNS_ATTR_VALS_CB *ISNSAttrGetList (ISNS_Msg_Descp * p_md); - void SNSCheckTxQueue (); - void SNSCheckInitTxQueue (ISNS_Msg_Descp * p_md); - int TCP_RecvMain(); ! int rc; ! DWORD request_id; ! ! /* * Function Name: SNSMain * --- 108,125 ---- static ISNS_Msg_Descp query_md; /* * Local function prototypes. */ static void regCallback(ISNS_Msg_Descp* p_md); static void SNSProcessRequest (ISNS_Msg_Descp *); void SNSReqTimeoutHdlr (void); int SNSExecCallback (ISNS_Msg_Descp *, int status); void SNSCheckTxQueue (); void SNSCheckInitTxQueue (ISNS_Msg_Descp * p_md); int TCP_RecvMain(); + static int ISNSdbExec( ISNS_Msg_Descp *p_md, ISNS_Msg_Descp *p_rsp_md); + extern void ISNSNotReady (); ! /******************************************************************** * Function Name: SNSMain * *************** *** 172,189 **** * * ! */ int SNSMain (ISNS_Entity role) { pthread_t athread; - /* - * place holder for the received iSNS message - */ ISNS_Msg_Descp *p_md; - #ifdef SNS_LINUX - int res; - #endif - - #define BYTES_TO_SHOW 32 printf ("IETF iSNS Open Source, v%s.\n", ISNS_VERSION); --- 135,145 ---- * * ! ********************************************************************/ int SNSMain (ISNS_Entity role) { + int rc; pthread_t athread; ISNS_Msg_Descp *p_md; printf ("IETF iSNS Open Source, v%s.\n", ISNS_VERSION); *************** *** 195,200 **** if (SNSInit (role) == ERROR) ! taskDelete (taskIdSelf ()); #ifdef SNS_LINUX res = pthread_mutex_init (&sns_request_timer, NULL); /* Create AND initialize the request condition */ --- 151,159 ---- if (SNSInit (role) == ERROR) ! taskDelete (taskIdSelf ()); ! #ifdef SNS_LINUX + { + int res; res = pthread_mutex_init (&sns_request_timer, NULL); /* Create AND initialize the request condition */ *************** *** 223,230 **** } - { pthread_t hdle; - /* Linux */ - /*printf ("Creating thread for SNSReqTimeoutThread\n");*/ rc =(int)pthread_create (&hdle, NULL, (void *)SNSReqTimeoutThread, NULL); if (rc != 0){ --- 182,186 ---- *************** *** 234,253 **** } #else - /* - * Create the sns request timer - */ - sns_request_timer = CreateWaitableTimer (NULL, FALSE, NULL); - { ! DWORD junk; ! request_pid = ! CreateThread (0, 0, SNSReqTimeoutThread, &junk, 0, &request_id); } #endif ! //InitAllTables (); ! #ifndef SNS_LINUX ! if (loadFlag) ! ISNSdbLoad(); ! #endif /* * Wait for a message to arrive. --- 190,202 ---- } #else { ! /* ! * Create the sns request timer ! */ ! sns_request_timer = CreateWaitableTimer (NULL, FALSE, NULL); ! request_pid = CreateThread (0, 0, SNSReqTimeoutThread, &junk, 0, &request_id); } #endif ! /* * Wait for a message to arrive. *************** *** 257,281 **** for (;;) { ! extern int pauseFlag; ! if (pauseFlag) ! return (SUCCESS); ! ! if (SUCCESS == ReceiveIPCMessage (SNS_EP, (void *) p_md, ! sizeof (ISNS_Msg_Descp), ! 0)) { - if (!(isns_main_debug & 0x80)) - { - if (SUCCESS == SNSConvertPayloadNTOH (p_md)) - SNSProcessRequest (p_md); - else - DEBUG_0 (1, (Parse Error:Msg Dropped)); - - } - else - { SNSConvertPayloadNTOH (p_md); SNSProcessRequest (p_md); - } } --- 206,213 ---- for (;;) { ! if (SUCCESS == ReceiveIPCMessage (SNS_EP, (void *) p_md, sizeof (ISNS_Msg_Descp), 0)) { SNSConvertPayloadNTOH (p_md); SNSProcessRequest (p_md); } *************** *** 283,287 **** SNSCheckTxQueue (); - if (sns_fsm_timeout) SNSCheckInitTxQueue (p_md); --- 215,218 ---- *************** *** 289,299 **** return (SUCCESS); - } /* End SNSMain */ ! ! ! /* * Function Name: SNSProcessRequest * --- 220,227 ---- return (SUCCESS); } /* End SNSMain */ ! /******************************************************************** * Function Name: SNSProcessRequest * *************** *** 305,309 **** * * ! */ static void SNSProcessRequest (ISNS_Msg_Descp * p_md) --- 233,237 ---- * * ! ********************************************************************/ static void SNSProcessRequest (ISNS_Msg_Descp * p_md) *************** *** 620,623 **** --- 548,553 ---- + /******************************************************************** + ********************************************************************/ void SNSReqTimeoutHdlr (void) *************** *** 626,630 **** } ! /* * Function Name: SNSExecCallback * --- 556,560 ---- } ! /******************************************************************** * Function Name: SNSExecCallback * *************** *** 635,639 **** * Return value: SUCCESS or ERROR. * ! */ int SNSExecCallback (ISNS_Msg_Descp * p_md, int status) --- 565,569 ---- * Return value: SUCCESS or ERROR. * ! ********************************************************************/ int SNSExecCallback (ISNS_Msg_Descp * p_md, int status) *************** *** 694,697 **** --- 624,629 ---- } + /******************************************************************** + ********************************************************************/ void SNSCheckTxQueue () *************** *** 775,778 **** --- 707,712 ---- } + /******************************************************************** + ********************************************************************/ void SNSCheckInitTxQueue (ISNS_Msg_Descp * p_md) *************** *** 786,924 **** } ! ISNS_ATTR_VALS_CB * ! ISNSAttrGetList (ISNS_Msg_Descp *p_md) ! { ! ISNS_Key *p_key; ! char *loc_ptr1; ! uint16_t sns_attr_len; ! ISNS_ATTR_VALS *p_aval; ! ISNS_ATTR_VALS_CB *p_attr_vals_cb; ! void *val_location; ! int num_entries, ii; ! int display_debug; ! uint16_t len; ! ! display_debug = 0; ! if ((sns_cb_debug == 3) && (p_md->msg.hdr.type != ISNS_SCN)) ! display_debug = (sns_cb_msg_filter == p_md->msg.hdr.type); ! ! /* ! * Initialize the vars and go to the start ! * of the message.. ! */ ! p_aval = NULL; ! p_attr_vals_cb = NULL; ! len = 0; ! ! if (p_md->msg.hdr.type == ISNS_SCN) ! { ! /* No error Code */ ! p_key = (ISNS_Key *)&p_md->msg.payload; ! sns_attr_len = p_md->msg.hdr.msg_len; ! } ! else ! { ! /* Error Code */ ! p_key = (ISNS_Key *)&p_md->msg.payload+ISNS_ERROR_CODE_SIZE; ! sns_attr_len = p_md->msg.hdr.msg_len-ISNS_ERROR_CODE_SIZE; ! } ! DEBUG_1 (display_debug, (Attributes length : 0x%x), sns_attr_len); ! ! /* ! * Go through the message's attributes and parse them into ! * the Attribute list. NOTE: All the pointers are allocated ! * here including the storage for the attribute values. ! */ ! num_entries = 0; ! loc_ptr1 = (char *)p_key; ! p_aval = (void *)ISNSAllocBuffer (sns_attr_len); ! ! while (((char *)loc_ptr1 - (char *)p_key) < sns_attr_len) ! { ! if (p_aval == NULL) ! { ! SNS_WARN(SNS_BUFFER_WARN, ! "AttrGetList out of aval buffs (size)\n", ! sns_attr_len, 0, 0); ! return (NULL); ! } ! ! /* Set the VALUE location for the attributes */ ! val_location = SNSAttrGetAttrValLocation((ISNS_Attr *)loc_ptr1); ! len = ((ISNS_Attr *)loc_ptr1)->len; ! ! if (val_location == NULL) ! { ! SNS_WARN(SNS_GETATTR_WARN, ! "AttrGetList id not found (tag, msg id, xid)\n", ! ((ISNS_Attr *)loc_ptr1)->tag, p_md->msg.hdr.type, ! p_md->msg.hdr.xid); ! ISNSFreeBuffer((char *)p_aval); ! p_aval = NULL; ! break; ! } ! ! p_aval[num_entries].attr_id = ((ISNS_Attr *)loc_ptr1)->tag; ! p_aval[num_entries].attr_len = len; ! p_aval[num_entries].attr_val = val_location; ! ! /* Word Align values */ ! if (len % 4) ! len += 4 - (len % 4); ! ! /* Debugging */ ! if ((sns_scn_debug == 3) && (p_md->msg.hdr.type == ISNS_SCN)) ! { ! if (p_aval[num_entries].attr_id == RSCN_EVENT) ! display_debug = (sns_scn_msg_filter == ! *(int *)p_aval[num_entries].attr_val); ! } ! DEBUG_2 (display_debug, (attr id %u, len %d), ! p_aval[num_entries].attr_id, ! p_aval[num_entries].attr_len); ! if (display_debug) ! { ! for (ii = 0; ii < p_aval[num_entries].attr_len; ii++) ! printf("%02x", *((char *)p_aval[num_entries].attr_val + ii)); ! printf("\n"); ! } ! /* End Debugging */ ! loc_ptr1 = (char *) loc_ptr1 + ISNS_SIZEOF_TAG + len; ! num_entries++; ! } ! /* ! * Set the attribute value control block. ! */ ! if (p_aval != NULL) ! { ! p_attr_vals_cb = (ISNS_ATTR_VALS_CB *) ! ISNSAllocBuffer(sizeof (ISNS_ATTR_VALS_CB)); ! ! if (p_attr_vals_cb == NULL) ! { ! SNS_WARN(SNS_BUFFER_WARN, "AttrGetList out of cb buffs (size)\n", ! (int)sizeof (ISNS_ATTR_VALS_CB), 0, 0); ! } ! else ! { ! p_attr_vals_cb->num_entries = num_entries; ! p_attr_vals_cb->total_size = sns_attr_len; ! p_attr_vals_cb->attr_val_sptr = p_aval; ! } ! } ! return (p_attr_vals_cb); ! } ! ! static void* ! SNSAttrGetAttrValLocation (ISNS_Attr *sns_attr) ! { ! if (sns_attr->tag < ISNS_END_VALID_TAG) ! { ! return ((void *)&sns_attr->val); ! } ! ! return (NULL); ! } ! static void regCallback(ISNS_Msg_Descp* p_md) { --- 720,725 ---- } ! /******************************************************************** ! ********************************************************************/ static void regCallback(ISNS_Msg_Descp* p_md) { *************** *** 946,950 **** /******************************************************************** ********************************************************************/ ! int ISNSdbExec( ISNS_Msg_Descp *p_md, ISNS_Msg_Descp *p_rsp_md) { --- 747,751 ---- /******************************************************************** ********************************************************************/ ! static int ISNSdbExec( ISNS_Msg_Descp *p_md, ISNS_Msg_Descp *p_rsp_md) { *************** *** 988,992 **** case ISNS_DEREG_DEV_REQ: { ! errorCode = ISNSdbRemoveAttr( p_md ); break; } --- 789,793 ---- case ISNS_DEREG_DEV_REQ: { ! errorCode = ISNSdbRemoveAttr( p_md, &p_rsp_md->msg); break; } *************** *** 1002,1006 **** break; } - case ISNS_SCN: { --- 803,806 ---- *************** *** 1010,1014 **** case ISNS_DEV_ATTR_QRY_REQ: { ! errorCode = ISNSdbGetAttr ( p_md, p_rsp_md ); break; } --- 810,814 ---- case ISNS_DEV_ATTR_QRY_REQ: { ! errorCode = ISNSdbGetAttr ( p_md, &p_rsp_md->msg); break; } *************** *** 1035,1039 **** case ISNS_ESI_RSP: { ! ISNS_ProcessESI( p_md ); break; } --- 835,839 ---- case ISNS_ESI_RSP: { ! errorCode = ISNS_ProcessESI( p_md ); break; } |