}
NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd,
- struct smbXsrv_connection **_xconn)
+ NTTIME now, struct smbXsrv_connection **_xconn)
{
TALLOC_CTX *frame = talloc_stackframe();
struct smbXsrv_connection *xconn;
return NT_STATUS_NO_MEMORY;
}
talloc_steal(frame, xconn);
+ xconn->connect_time = now;
+ if (client->next_channel_id != 0) {
+ xconn->channel_id = client->next_channel_id++;
+ }
xconn->transport.sock = sock_fd;
smbd_echo_init(xconn);
smbd_setup_sig_hup_handler(sconn);
}
- status = smbd_add_connection(client, sock_fd, &xconn);
+ status = smbd_add_connection(client, sock_fd, now, &xconn);
if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_ACCESS_DENIED)) {
/*
* send a negative session response "not listening on calling