/* Sends one request for this server. (smbiod) Must be called with the server lock held. Returns: <0 on error 0 if no request could be completely sent 1 if all data for one request was sent  */
int smb_request_send_server(struct smb_sb_info *server)
/* Sends one request for this server. (smbiod) Must be called with the server lock held. Returns: <0 on error 0 if no request could be completely sent 1 if all data for one request was sent  */
int smb_request_send_server(struct smb_sb_info *server)
{
	struct list_head *head;
	struct smb_request *req;
	int result;
	if (server->state != CONN_VALID)
		return 0;
	req = NULL;
	head = server->xmitq.next;
	if (head != &server->xmitq) {
		req = list_entry(head, struct smb_request, rq_queue);
	}
	if (!req)
		return 0;
	result = smb_request_send_req(req);
	if (result < 0) {
		server->conn_error = result;
		list_move(&req->rq_queue, &server->xmitq);
		result = -EIO;
		goto out;
	}
out:
	return result;
}