if (WANTS_UNICODE(pktp) && !(flags & SMB_STRF_FORCEASCII)) {
StringCbLengthW(str, SMB_STRINGBUFSIZE * sizeof(wchar_t), plen);
- if (!(flags & SMB_STRF_IGNORENULL))
+ if (!(flags & SMB_STRF_IGNORENUL))
*plen += sizeof(wchar_t);
return (unsigned char *) 1; /* return TRUE if we are using unicode */
cch_dest = cm_ClientStringToUtf8(str, (int)cch_str, NULL, 0);
if (plen)
- *plen = ((flags & SMB_STRF_IGNORENULL)? cch_dest: cch_dest+1);
+ *plen = ((flags & SMB_STRF_IGNORENUL)? cch_dest: cch_dest+1);
return NULL;
}
return NULL;
*((wchar_t *) outp) = L'\0';
- if (plen && !(flags & SMB_STRF_IGNORENULL))
+ if (plen && !(flags & SMB_STRF_IGNORENUL))
*plen += sizeof(wchar_t);
return outp + sizeof(wchar_t);
}
}
if (plen)
- *plen += sizeof(wchar_t) * ((flags & SMB_STRF_IGNORENULL)? nchars - 1: nchars);
+ *plen += sizeof(wchar_t) * ((flags & SMB_STRF_IGNORENUL)? nchars - 1: nchars);
return outp + sizeof(wchar_t) * nchars;
}
cch_dest = cm_ClientStringToUtf8(str, -1, outp, (int)buffersize);
if (plen)
- *plen += ((flags & SMB_STRF_IGNORENULL)? cch_dest - 1: cch_dest);
+ *plen += ((flags & SMB_STRF_IGNORENUL)? cch_dest - 1: cch_dest);
return outp + cch_dest;
}
#ifdef SMB_UNICODE
}
#endif
- smb_UnparseString(op, qi.u.FSattributeInfo.FSname, _C("AFS"), &sz, 0);
+ smb_UnparseString(op, qi.u.FSattributeInfo.FSname, _C("AFS"), &sz, SMB_STRF_IGNORENUL);
qi.u.FSattributeInfo.FSnameLength = sz;
responseSize =
goto done;
}
- smb_UnparseString(opx, qpi.u.QPfileAltNameInfo.fileName, shortName, &len, 0);
+ smb_UnparseString(opx, qpi.u.QPfileAltNameInfo.fileName, shortName, &len, SMB_STRF_IGNORENUL);
qpi.u.QPfileAltNameInfo.fileNameLength = len;
goto done;
}
else if (infoLevel == SMB_QUERY_FILE_NAME_INFO) {
- smb_UnparseString(opx, qpi.u.QPfileNameInfo.fileName, lastComp, &len, 0);
+ smb_UnparseString(opx, qpi.u.QPfileNameInfo.fileName, lastComp, &len, SMB_STRF_IGNORENUL);
qpi.u.QPfileNameInfo.fileNameLength = len;
goto done;
qpi.u.QPfileAllInfo.mode = 0;
qpi.u.QPfileAllInfo.alignmentRequirement = 0;
- smb_UnparseString(opx, qpi.u.QPfileAllInfo.fileName, lastComp, &len, 0);
+ smb_UnparseString(opx, qpi.u.QPfileAllInfo.fileName, lastComp, &len, SMB_STRF_IGNORENUL);
qpi.u.QPfileAllInfo.fileNameLength = len;
}
name = _C("\\"); /* probably can't happen */
lock_ReleaseMutex(&fidp->mx);
- smb_UnparseString(opx, qfi.u.QFfileNameInfo.fileName, name, &len, 0);
+ smb_UnparseString(opx, qfi.u.QFfileNameInfo.fileName, name, &len, SMB_STRF_IGNORENUL);
outp->totalData = len + 4; /* this is actually what we want to return */
qfi.u.QFfileNameInfo.fileNameLength = len;
}
/* add header to name & term. null */
onbytes = 0;
- smb_UnparseString(opx, NULL, maskp, &onbytes, SMB_STRF_ANSIPATH);
+ smb_UnparseString(opx, NULL, maskp, &onbytes, SMB_STRF_ANSIPATH|SMB_STRF_IGNORENUL);
orbytes = ohbytes + onbytes;
/* now, we round up the record to a 4 byte alignment, and we make
memset(origOp, 0, orbytes);
onbytes = 0;
- smb_UnparseString(opx, origOp + ohbytes, maskp, &onbytes, SMB_STRF_ANSIPATH);
+ smb_UnparseString(opx, origOp + ohbytes, maskp, &onbytes, SMB_STRF_ANSIPATH|SMB_STRF_IGNORENUL);
switch (infoLevel) {
case SMB_INFO_STANDARD:
/* finally check if this name will fit */
onbytes = 0;
- smb_UnparseString(opx, NULL, cfileName, &onbytes, SMB_STRF_ANSIPATH);
+ smb_UnparseString(opx, NULL, cfileName, &onbytes, SMB_STRF_ANSIPATH|SMB_STRF_IGNORENUL);
orbytes = ohbytes + onbytes;
/* now, we round up the record to a 4 byte alignment,
memset(origOp, 0, orbytes);
onbytes = 0;
- smb_UnparseString(opx, origOp + ohbytes, cfileName, &onbytes, SMB_STRF_ANSIPATH);
+ smb_UnparseString(opx, origOp + ohbytes, cfileName, &onbytes, SMB_STRF_ANSIPATH|SMB_STRF_IGNORENUL);
switch (infoLevel) {
case SMB_INFO_STANDARD: