| 386 | } |
| 387 | |
| 388 | static void send_one_list(int f, struct idlist *idlist, int usernames) |
| 389 | { |
| 390 | struct idlist *list; |
| 391 | |
| 392 | /* we send sequences of id/byte-len/name */ |
| 393 | for (list = idlist; list; list = list->next) { |
| 394 | if (list->id && list->u.name) |
| 395 | send_one_name(f, list->id, list->u.name); |
| 396 | } |
| 397 | |
| 398 | /* Terminate the uid list with 0 (which was excluded above). |
| 399 | * A modern rsync also sends the name of id 0. */ |
| 400 | if (xmit_id0_names) |
| 401 | send_one_name(f, 0, usernames ? uid_to_user(0) : gid_to_group(0)); |
| 402 | else |
| 403 | write_varint30(f, 0); |
| 404 | } |
| 405 | |
| 406 | /* send a complete uid/gid mapping to the peer */ |
| 407 | void send_id_lists(int f) |
no test coverage detected