videolabs / libdsm

Defective SMb: A minimalist implementation of a client library for SMBv1 using Plain'Ol C

Home Page:http://videolabs.github.io/libdsm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Application crashes when wifi lost during smb_write and smb_read operations

SyedZeeshan21 opened this issue · comments

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.

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

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???

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?

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.