tipc: Display meaningful peer interface name during link creation

Sets the peer interface portion of the name of a newly created link
endpoint to "unknown". This ensures that state and statistics information
can be properly displayed during the time between the link endpoint's
creation and the time handshaking with its peer is completed.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
This commit is contained in:
Allan Stephens 2011-04-07 09:28:47 -04:00 коммит произвёл Paul Gortmaker
Родитель ed33a9c4e3
Коммит 062b4c99fe
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -332,12 +332,12 @@ struct link *tipc_link_create(struct tipc_node *n_ptr,
l_ptr->addr = peer; l_ptr->addr = peer;
if_name = strchr(b_ptr->name, ':') + 1; if_name = strchr(b_ptr->name, ':') + 1;
sprintf(l_ptr->name, "%u.%u.%u:%s-%u.%u.%u:", sprintf(l_ptr->name, "%u.%u.%u:%s-%u.%u.%u:unknown",
tipc_zone(tipc_own_addr), tipc_cluster(tipc_own_addr), tipc_zone(tipc_own_addr), tipc_cluster(tipc_own_addr),
tipc_node(tipc_own_addr), tipc_node(tipc_own_addr),
if_name, if_name,
tipc_zone(peer), tipc_cluster(peer), tipc_node(peer)); tipc_zone(peer), tipc_cluster(peer), tipc_node(peer));
/* note: peer i/f is appended to link name by reset/activate */ /* note: peer i/f name is updated by reset/activate message */
memcpy(&l_ptr->media_addr, media_addr, sizeof(*media_addr)); memcpy(&l_ptr->media_addr, media_addr, sizeof(*media_addr));
l_ptr->owner = n_ptr; l_ptr->owner = n_ptr;
l_ptr->checkpoint = 1; l_ptr->checkpoint = 1;