Bug 7345 - Incomplete description of function return values in libsmbclient.h
Summary: Incomplete description of function return values in libsmbclient.h
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.4.5
Hardware: Other Linux
: P3 minor
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-10 12:06 UTC by Philip Prindeville
Modified: 2010-04-16 02:38 UTC (History)
0 users

See Also:


Attachments
patch for v3-5-test (3.02 KB, patch)
2010-04-12 07:41 UTC, Derrell Lipman
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Prindeville 2010-04-10 12:06:30 UTC
The header file libsmbclient.h (which is ostensibly the entirety of the API documentation) has some missing fields.

The return values for smbc_fstat(), smbc_statvfs(), smbc_fstatvfs(), and smbc_ftruncate() don't enumerate success values.

Presumably the line:

@return          0 on success, < 0 on error with errno set:

is missing.

smbc_urldecode() also seems to be incorrect.

Lastly, smbc_read() doesn't state what its return value is on End-of-File.
Comment 1 Derrell Lipman 2010-04-11 10:12:37 UTC
Thanks for the report. Please elaborate on what seems incorrect about smbc_urldecode(). I'll fix the others.

Derrell
Comment 2 Philip Prindeville 2010-04-11 10:34:58 UTC
(In reply to comment #1)
> Thanks for the report. Please elaborate on what seems incorrect about
> smbc_urldecode(). I'll fix the others.
> 
> Derrell

Went back and looked again, but couldn't find what it was.  So let's skip it for now, and if I find it again I'll either reopen the bug or file a new one.


Comment 3 Derrell Lipman 2010-04-12 07:41:39 UTC
Created attachment 5625 [details]
patch for v3-5-test
Comment 4 Jeremy Allison 2010-04-13 13:26:11 UTC
Comment on attachment 5625 [details]
patch for v3-5-test

Looks good to me.
Comment 5 Jeremy Allison 2010-04-13 13:28:11 UTC
Re-assigning to Karolin for inclusion in 3.5.x.
Jeremy.
Comment 6 Karolin Seeger 2010-04-13 13:38:26 UTC
Pushed to v3-5-test.
Patch applies to v3-4-test also and the bug was reported against 3.4.5.
Derrell, shall I pick this one for v3-4-test also?
Comment 7 Derrell Lipman 2010-04-13 13:45:43 UTC
Yes. I just confirmed that it applies cleanly (with an 11-line offset). No reason not to apply it there too.

Thanks.

Derrell
Comment 8 Derrell Lipman 2010-04-13 13:46:44 UTC
reassign back to Karolin
Comment 9 Karolin Seeger 2010-04-16 02:38:06 UTC
Pushed to v3-4-test also.
Closing out bug report.

Thanks!