diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-01-03 12:47:24 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-01-03 19:58:53 +0100 |
commit | 5fa0d3d56824f4ef3dfdb0f97c836554a62c4875 (patch) | |
tree | 6973a352fc244df2641655e9c645f319a0632970 /source4/auth/kerberos | |
parent | b1be241ca5d7f02be93bd3582b98d428b1e207ce (diff) | |
download | samba-5fa0d3d56824f4ef3dfdb0f97c836554a62c4875.tar.gz samba-5fa0d3d56824f4ef3dfdb0f97c836554a62c4875.tar.bz2 samba-5fa0d3d56824f4ef3dfdb0f97c836554a62c4875.zip |
s4:socket: use a socket_wrapper aware function to auto close the fd event for sockets
metze
Diffstat (limited to 'source4/auth/kerberos')
-rw-r--r-- | source4/auth/kerberos/krb5_init_context.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c index 2f0a2317a0..6830bb7189 100644 --- a/source4/auth/kerberos/krb5_init_context.c +++ b/source4/auth/kerberos/krb5_init_context.c @@ -284,11 +284,12 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context context, * drop) and mark as AUTOCLOSE along with the fde */ /* Ths is equivilant to EVENT_FD_READABLE(smb_krb5->fde) */ - smb_krb5->fde = event_add_fd(ev, smb_krb5->sock, - socket_get_fd(smb_krb5->sock), - EVENT_FD_READ|EVENT_FD_AUTOCLOSE, - smb_krb5_socket_handler, smb_krb5); + smb_krb5->fde = tevent_add_fd(ev, smb_krb5->sock, + socket_get_fd(smb_krb5->sock), + TEVENT_FD_READ, + smb_krb5_socket_handler, smb_krb5); /* its now the job of the event layer to close the socket */ + tevent_fd_set_close_fn(smb_krb5->fde, socket_tevent_fd_close_fn); socket_set_flags(smb_krb5->sock, SOCKET_FLAG_NOCLOSE); event_add_timed(ev, smb_krb5, |