Changes in uspace/srv/net/inetsrv/inet_link.c [695b6ff:b8b1adb1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/inetsrv/inet_link.c
r695b6ff rb8b1adb1 493 493 } 494 494 495 /** Get IDs of all links. */ 496 int inet_link_get_id_list(sysarg_t **rid_list, size_t *rcount) 497 { 498 sysarg_t *id_list; 499 size_t count, i; 500 501 fibril_mutex_lock(&inet_discovery_lock); 502 count = list_count(&inet_link_list); 503 504 id_list = calloc(count, sizeof(sysarg_t)); 505 if (id_list == NULL) { 506 fibril_mutex_unlock(&inet_discovery_lock); 507 return ENOMEM; 508 } 509 510 i = 0; 511 list_foreach(inet_link_list, link_list, inet_link_t, ilink) { 512 id_list[i++] = ilink->svc_id; 513 log_msg(LOG_DEFAULT, LVL_NOTE, "add link to list"); 514 } 515 516 fibril_mutex_unlock(&inet_discovery_lock); 517 518 log_msg(LOG_DEFAULT, LVL_NOTE, "return %zu links", count); 519 *rid_list = id_list; 520 *rcount = count; 521 522 return EOK; 523 } 524 495 525 /** @} 496 526 */
Note:
See TracChangeset
for help on using the changeset viewer.