int uLevel = 1;
int count = -1;
+ errno = 0; /* reset */
+
/* send a SMBtrans command with api NetServerEnum */
p = param;
SSVAL(p,0,0x68); /* api number */
SAFE_FREE(rparam);
SAFE_FREE(rdata);
-
+
+ if (count < 0) {
+ errno = cli_errno(cli);
+ } else {
+ if (!count) {
+ /* this is a very special case, when the domain master for the
+ work group isn't part of the work group itself, there is something
+ wild going on */
+ errno = ENOENT;
+ }
+ }
+
return(count > 0);
}
SAFE_FREE(dir->fname);
SAFE_FREE(dir);
}
- errno = cli_errno(&srv->cli);
return NULL;
SAFE_FREE(dir->fname);
SAFE_FREE(dir);
}
- errno = cli_errno(&srv->cli);
return NULL;
SAFE_FREE(dir->fname);
SAFE_FREE(dir);
}
- errno = cli_errno(&srv->cli);
return NULL;
}
}
else {
- errno = ENODEV; /* Neither the workgroup nor server exists */
+ errno = ECONNREFUSED; /* Neither the workgroup nor server exists */
if (dir) {
SAFE_FREE(dir->fname);
SAFE_FREE(dir);