SMB3 Multi-Channel (Re: What I'm working on)

Stefan (metze) Metzmacher metze at samba.org
Mon Aug 4 06:56:30 MDT 2014


Hi Volker,

>> On the one hand, there is this hunk:
>>
>> -               if (write_data(fsp->conn->sconn->sock, buf, cur_read)
>> -                   != cur_read) {
>> -                       char addr[INET6_ADDRSTRLEN];
>> +               ret = write_data(xconn->sconn->sock, buf, cur_read);
>> +               if (ret != cur_read) {
>> +                       int saved_errno = errno;
>>
>> but also
> 
>>                        to_write = MIN(SHORT_SEND_BUFSIZE, smb_maxcnt - nread);
>> -                       if (write_data(fsp->conn->sconn->sock, buf, to_write)
>> +                       if (write_data(xconn->sconn->sock, buf, to_write)
>>                            != to_write) {
> 
>> So in some of the hunks we have the "never do function calls in
>> expressions", convention pushed through, but not in all of them. Is
>> there any reason for this?
>>
> 
> I guess in some situations there where already a ret variable,
> or in some I just forgot about it and did a strict string replacement.
> 
> I'll might change this to always ret, maybe as separate commit before
> this one.

Fixed. This change was actually in a later commit, they're now in the one
commit you commented on.

>> Also, in some places I don't see errno is saved around the DEBUG message
>> where it was not before. DEBUG itself can change the errno.
> 
> I'll have a look and fix this.

Fixed.

>> TODO/REVIEW s3:smb2_server: talloc smbd_smb2_request as
>> child of smbXsrv_connection
> 
> and
>
>> TODO/REVIEW s3:smb2_server: remember smbXsrv_connection
>> for each smbd_smb2_request
> 
> I'll extend the commit messages for these commits.

Updated.

Attached find a diff between the old and new patchset
together with the new patchset.

If you're fine with the changes we can finally push them.

Thanks!
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmp.diff
Type: text/x-diff
Size: 53505 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140804/39bdfc49/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmp.diff.bz2
Type: application/x-bzip
Size: 46337 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140804/39bdfc49/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140804/39bdfc49/attachment.pgp>


More information about the samba-technical mailing list