diff mbox

[1/4] sim_ctl_get_portinfo:

Message ID 4BA63949.90509@voltaire.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Doron Shoham March 21, 2010, 3:20 p.m. UTC
None
diff mbox

Patch

diff --git a/ibsim/ibsim.c b/ibsim/ibsim.c
index e720f0d..9326d37 100644
--- a/ibsim/ibsim.c
+++ b/ibsim/ibsim.c
@@ -318,10 +318,8 @@  static int sim_ctl_get_portinfo(Client * cl, struct sim_ctl * ctl)
 	uint8_t port_num = ctl->data[0];
 	if (port_num == 0 || port_num > cl->port->node->numports)
 		p = cl->port;
-	else if (cl->port->node->type == SWITCH_NODE)
-		p = node_get_port(cl->port->node, port_num);
 	else
-		p = node_get_port(cl->port->node, port_num - 1);
+		p = node_get_port(cl->port->node, port_num);
 	update_portinfo(p);
 	memcpy(ctl->data, p->portinfo, sizeof(ctl->data));
 	return 0;