From: Robert W. <wrw...@us...> - 2006-12-19 20:33:53
|
Update of /cvsroot/linuxisns/isnsNT/isnsclient/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4948/src Modified Files: entity.c iscsi.c parse.c portal.c Log Message: Fix deregister to use attr not keys Index: portal.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsclient/src/portal.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** portal.c 18 Dec 2006 23:00:04 -0000 1.7 --- portal.c 19 Dec 2006 20:33:49 -0000 1.8 *************** *** 56,59 **** --- 56,62 ---- return; + /* Add Delimiter */ + ISNSAppendAttr (&cmd, 0, 0, NULL, 0); + ip = inet_addr (DEFAULT_IP_ADDR); if (0 != *************** *** 71,81 **** /* Get Portal Type */ - // portal_type = 0; - // if (0 != - // GetInput (cmdLine, "Portal Type", "*0: UDP 1: TCP", sizeof (cmdLine))) - // { - // portal_type = atoi (cmdLine); - // } portal_type = 0; /* Get Port */ --- 74,83 ---- /* Get Portal Type */ portal_type = 0; + if (0 != + GetInput (cmdLine, "Portal Type", "*0: UDP 1: TCP", sizeof (cmdLine))) + { + portal_type = atoi (cmdLine); + } /* Get Port */ *************** *** 86,90 **** port = atoi (cmdLine); } ! printf("port:%i\n",port); ISNSAppendAttr (&cmd, ISNS_PORTAL_PORT, 4, NULL, port | (portal_type == 0 ? 0x10000 : 0)); --- 88,92 ---- port = atoi (cmdLine); } ! ISNSAppendAttr (&cmd, ISNS_PORTAL_PORT, 4, NULL, port | (portal_type == 0 ? 0x10000 : 0)); *************** *** 534,538 **** ISNSSendCmd (&cmd); } - - - --- 536,537 ---- Index: entity.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsclient/src/entity.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** entity.c 8 Dec 2006 20:05:49 -0000 1.7 --- entity.c 19 Dec 2006 20:33:49 -0000 1.8 *************** *** 58,61 **** --- 58,64 ---- return; + /* Add Delimiter */ + ISNSAppendAttr (&cmd, 0, 0, NULL, 0); + /* Get Node */ flag = FALSE; *************** *** 239,244 **** if (0 != GetInput (cmdLine, "Entity ID", "(none)", sizeof (cmdLine))) { ! ISNSAppendAttr (&cmd, ISNS_ENTITY_ID, PAD4 (strlen (cmdLine)), cmdLine, ! 0); } --- 242,246 ---- if (0 != GetInput (cmdLine, "Entity ID", "(none)", sizeof (cmdLine))) { ! ISNSAppendAttr (&cmd, ISNS_ENTITY_ID, PAD4 (strlen (cmdLine)), cmdLine,0); } Index: iscsi.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsclient/src/iscsi.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** iscsi.c 18 Dec 2006 23:00:03 -0000 1.5 --- iscsi.c 19 Dec 2006 20:33:49 -0000 1.6 *************** *** 350,353 **** --- 350,356 ---- return; + /* Delimiter */ + ISNSAppendAttr (&cmd, 0, 0, NULL, 0); + /* Get iSCSI Node ID */ if (0 == GetInput (cmdLine, "KEY: iSCSI Node Id", NULL, sizeof (cmdLine))) *************** *** 357,362 **** } ! ISNSAppendAttr (&cmd, ISNS_ISCSI_NODE_ID, PAD4 (strlen (cmdLine)), cmdLine, ! 0); ISNSSendCmd (&cmd); --- 360,365 ---- } ! ISNSAppendAttr (&cmd, ISNS_ISCSI_NODE_ID, PAD4 (strlen (cmdLine)), cmdLine, 0); ! ISNSSendCmd (&cmd); Index: parse.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsclient/src/parse.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** parse.c 18 Dec 2006 23:00:04 -0000 1.5 --- parse.c 19 Dec 2006 20:33:49 -0000 1.6 *************** *** 139,146 **** case ISNS_DD_IFCP_MEMBER : return("Discovery Domain iFCP Member"); case ISNS_COMPANY_OUI : return("Company OUI"); ! case ISNS_ENTITY_IDX : return("Entity Index"); ! case ISNS_ISCSI_IDX : return("iSCSI Index"); ! case ISNS_PORTAL_IDX : return("Portal Index"); ! case ISNS_DD_ISCSI_MEMBER_IDX: return("Discovery Domain iSCSI Member Index"); default : return("Unknown TAG code"); --- 139,150 ---- case ISNS_DD_IFCP_MEMBER : return("Discovery Domain iFCP Member"); case ISNS_COMPANY_OUI : return("Company OUI"); ! case ISNS_ENTITY_IDX : return("Entity Index"); ! case ISNS_ISCSI_IDX : return("iSCSI Index"); ! case ISNS_PORTAL_IDX : return("Portal Index"); ! case ISNS_DD_ISCSI_MEMBER_IDX: return("Discovery Domain iSCSI Member Index"); ! case ISNS_PORTAL_GROUP_ISCSI_NAME : return("Portal Group ISCSI Name"); ! case ISNS_PORTAL_GROUP_IP : return("Portal Group IP Address"); ! case ISNS_PORTAL_GROUP_PORT : return("Portal Group Port"); ! case ISNS_PORTAL_GROUP_TAG : return("Portal Group Tag"); default : return("Unknown TAG code"); *************** *** 228,231 **** --- 232,236 ---- case ISNS_ENTITY_PERIOD : case ISNS_PORTAL_PORT : + case ISNS_PORTAL_GROUP_PORT : case ISNS_ESI_INTERVAL : case ISNS_ESI_PORT : *************** *** 247,250 **** --- 252,256 ---- case ISNS_DD_ISCSI_MEMBER : case ISNS_DD_IFCP_MEMBER : + case ISNS_PORTAL_GROUP_ISCSI_NAME : printf ("Tag: %s = \"%s\"\n", isnsTagText(attrtag),(char *)&p_attr->val); break; *************** *** 257,260 **** --- 263,267 ---- case ISNS_FC_PORT_IP : case ISNS_FC_NODE_IP : + case ISNS_PORTAL_GROUP_IP : { char ipaddr[45]; |