Lines Matching refs:connection
53 safe_write(struct nscd_connection_ *connection, const void *data,
69 nevents = kevent(connection->write_queue, NULL, 0, &eventlist,
72 s_result = write(connection->sockfd,
91 safe_read(struct nscd_connection_ *connection, void *data, size_t data_size)
106 nevents = kevent(connection->read_queue, NULL, 0, &eventlist, 1,
109 s_result = read(connection->sockfd,
128 send_credentials(struct nscd_connection_ *connection, int type)
155 EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD,
157 kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL);
159 nevents = kevent(connection->write_queue, NULL, 0, &eventlist, 1, NULL);
161 result = sendmsg(connection->sockfd, &mhdr, 0) == -1 ? -1 : 0;
162 EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD,
164 kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL);
225 close_nscd_connection__(struct nscd_connection_ *connection)
229 assert(connection != NULL);
231 close(connection->sockfd);
232 close(connection->read_queue);
233 close(connection->write_queue);
234 free(connection);
239 nscd_transform__(struct nscd_connection_ *connection,
250 result = send_credentials(connection, CET_TRANSFORM_REQUEST);
259 result = safe_write(connection, &name_size, sizeof(size_t));
263 result = safe_write(connection, &transformation_type, sizeof(int));
268 result = safe_write(connection, entry_name, name_size);
273 result = safe_read(connection, &error_code, sizeof(int));