Update of /cvsroot/linuxisns/isnsNT/isnsserver/src
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv3984/src
Modified Files:
iSNSquery.c iSNSresponse.c
Log Message:
Add ISCSI_TYPE to query
Index: iSNSquery.c
===================================================================
RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSquery.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** iSNSquery.c 8 Dec 2006 20:20:34 -0000 1.6
--- iSNSquery.c 12 Dec 2006 21:38:29 -0000 1.7
***************
*** 1581,1585 ****
int portalPortKeyIndex;
SOIP_Entity *p_entity;
! ISNS_Key *key;
SOIP_Iscsi *p_node;
SOIP_ISCSI_Node_Id db_node_name;
--- 1581,1585 ----
int portalPortKeyIndex;
SOIP_Entity *p_entity;
! ISNS_Key *key=NULL;
SOIP_Iscsi *p_node;
SOIP_ISCSI_Node_Id db_node_name;
***************
*** 1860,1864 ****
if (rval == SUCCESS)
{
! /* ISNSDisplay_ISCSINode (p_node, HI_DETAIL); */
ISNSdbProcessISCSIOpAttr (p_rspmsg, (ISNS_Attr **)attr_indx, p_node);
foundFlag = TRUE;
--- 1860,1872 ----
if (rval == SUCCESS)
{
! /* if the first found entry then add the key attr */
! if (!foundFlag)
! {
! if (nodeTypeKeyIndex != -1)
! {
! ISNSAppendKey(p_rspmsg, ISNS_ISCSI_TYPE, key->len, (char *)&key->val, 0);
! ISNSAppendKey(p_rspmsg, ISNS_DELIMITER, 0, NULL, 0);
! }
! }
ISNSdbProcessISCSIOpAttr (p_rspmsg, (ISNS_Attr **)attr_indx, p_node);
foundFlag = TRUE;
Index: iSNSresponse.c
===================================================================
RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSresponse.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** iSNSresponse.c 6 Nov 2006 18:04:38 -0000 1.3
--- iSNSresponse.c 12 Dec 2006 21:38:29 -0000 1.4
***************
*** 95,100 ****
return (ERROR);
if (msg->hdr.msg_len == 0)
! msg->hdr.msg_len = 4 + ISNS_SIZEOF_TAG;
/* Jump to the end */
--- 95,104 ----
return (ERROR);
+ /* add room for error code */
if (msg->hdr.msg_len == 0)
! {
! msg->hdr.msg_len = 4;
! msg->hdr.msg_len += ISNS_SIZEOF_TAG; // add delimiter
! }
/* Jump to the end */
|