mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
Add a better error message to wb_common.c when unable to connect to a pipe
socket and add a comment to winbindd.c to explain the fancy calculation of buffer offset.
This commit is contained in:
@ -191,6 +191,8 @@ static int winbind_named_pipe_sock(const char *dir)
|
||||
|
||||
if (connect(fd, (struct sockaddr *)&sunaddr,
|
||||
sizeof(sunaddr)) == -1) {
|
||||
DEBUG(10, ("error connecting to pipe socket: %s\n",
|
||||
strerror(errno)));
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
@ -479,6 +479,13 @@ static void client_write(struct winbindd_cli_state *state)
|
||||
int num_written;
|
||||
|
||||
/* Write some data */
|
||||
/*
|
||||
* The fancy calculation of data below allows us to handle the
|
||||
* case where write (sys_write) does not write all the data we
|
||||
* gave it. In that case, we will come back through here again
|
||||
* because of the loop above us, and we want to pick up where
|
||||
* we left off.
|
||||
*/
|
||||
|
||||
if (!state->write_extra_data) {
|
||||
|
||||
|
Reference in New Issue
Block a user