Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/net/nscachedcli.c
Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | |||||
* communication element type. | * communication element type. | ||||
*/ | */ | ||||
static int | static int | ||||
send_credentials(struct cached_connection_ *connection, int type) | send_credentials(struct cached_connection_ *connection, int type) | ||||
{ | { | ||||
struct kevent eventlist; | struct kevent eventlist; | ||||
int nevents; | int nevents; | ||||
ssize_t result; | ssize_t result; | ||||
int res; | int res __unused; | ||||
struct msghdr cred_hdr; | struct msghdr cred_hdr; | ||||
struct iovec iov; | struct iovec iov; | ||||
struct { | struct { | ||||
struct cmsghdr hdr; | struct cmsghdr hdr; | ||||
char cred[CMSG_SPACE(sizeof(struct cmsgcred))]; | char cred[CMSG_SPACE(sizeof(struct cmsgcred))]; | ||||
} cmsg; | } cmsg; | ||||
▲ Show 20 Lines • Show All 312 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Gracefully closes the write session. The data, that were previously written | * Gracefully closes the write session. The data, that were previously written | ||||
* to the session, are committed. | * to the session, are committed. | ||||
*/ | */ | ||||
int | int | ||||
__close_cached_mp_write_session(struct cached_connection_ *ws) | __close_cached_mp_write_session(struct cached_connection_ *ws) | ||||
{ | { | ||||
int notification; | int notification; | ||||
int result; | int result __unused; | ||||
notification = CET_MP_WRITE_SESSION_CLOSE_NOTIFICATION; | notification = CET_MP_WRITE_SESSION_CLOSE_NOTIFICATION; | ||||
result = safe_write(ws, ¬ification, sizeof(int)); | result = safe_write(ws, ¬ification, sizeof(int)); | ||||
__close_cached_connection(ws); | __close_cached_connection(ws); | ||||
return (0); | return (0); | ||||
} | } | ||||
struct cached_connection_ * | struct cached_connection_ * | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |