videolabs / libdsm

Defective SMb: A minimalist implementation of a client library for SMBv1 using Plain'Ol C
http://videolabs.github.io/libdsm
Other
209 stars 86 forks source link

Application crashes when wifi lost during smb_write and smb_read operations #94

Open SyedZeeshan21 opened 8 years ago

SyedZeeshan21 commented 8 years ago

Hi, i am using smb_fwrite and smb_fread methods for writing and reading operations, while operation is in progress and wifi connection is lost,there is no error provided in this case, please help me to handle this situation.

chouquette commented 8 years ago

Could you provide a stacktrace and/or a simple test application ?

SyedZeeshan21 commented 8 years ago

Thanks for your response, during smb_fread operation, when download operation is in progress and if i have switched wifi or off wifi and try connect it back, if this is done multiple times there is no response of download operation .

        length = smb_fread(self.downloadSession, fileID, buffer, BUFFER_DOWNLOAD_SIZE);

Even after 5 min there is no response of download operation in progress... Is there any smb_req timeout property for smb_fread operation???

jbkempf commented 7 years ago

See also #95

khodzha commented 5 years ago

is adding timeval timeout field to smb_session and setting SO_RCVTIMEO and SO_SNDTIMEO on netbios_session socket an appropriate fix for this?

also isnt lib basically dead with all of smb1 security issues?

jbkempf commented 1 year ago

is adding timeval timeout field to smb_session and setting SO_RCVTIMEO and SO_SNDTIMEO on netbios_session socket an appropriate fix for this?

Probably, yes.