Getting notification upon loss of connection (libsmbclient)

Derrell.Lipman at UnwiredUniverse.com Derrell.Lipman at UnwiredUniverse.com
Wed Mar 12 21:07:43 GMT 2003


I have not been able to find the block of code that will be called if an open
connection receives an indication that the peer has "gone away"
(i.e. shutdown, crashed, cable cut, etc.).

More specifically, if I have an open, established connection by having
previously done:

  cli_connect()
  cli_session_request()
  cli_session_setup()
  cli_send_tconX()

and now the remote server goes away (let's say it crashed suddenly), how can I
find this out?

The above functions are used by smbwrapper to establish a connection to a
server.  If smbwrapper is being used by a long-lived application (e.g. emacs),
and the connection goes away, currently, access to the remote system stops and
is never regained even after the server becomes available again, because (I
think) the current code has no way to determine that the connection went away
and continues to (try to) use the now-failed connection.

Your help will be much appreciated!

Cheers,

Derrell


More information about the samba-technical mailing list