summaryrefslogtreecommitdiff
path: root/source3/printing/printing.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-04 07:15:53 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-04 07:15:53 +0000
commit87fbb7092b8f8b2f0db0f361c3d625e19de57cd9 (patch)
tree3c302f710cbaa03e3c0d46549e8982771b12b8a5 /source3/printing/printing.c
parent9e9e73303ec10a64bd744b9b33f4e6cd7d394f03 (diff)
downloadsamba-87fbb7092b8f8b2f0db0f361c3d625e19de57cd9.tar.gz
samba-87fbb7092b8f8b2f0db0f361c3d625e19de57cd9.tar.bz2
samba-87fbb7092b8f8b2f0db0f361c3d625e19de57cd9.zip
The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r--source3/printing/printing.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index aab4c2f43f..d0a07ccb4c 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -255,7 +255,6 @@ static void print_cache_flush(int snum)
{
fstring key;
slprintf(key, sizeof(key)-1, "CACHE/%s", lp_servicename(snum));
- dos_to_unix(key, True); /* Convert key to unix-codepage */
tdb_store_int(tdb, key, -1);
}
@@ -328,10 +327,7 @@ static void print_queue_update(int snum)
fstring keystr, printer_name, cachestr;
TDB_DATA data, key;
- /* Convert printer name (i.e. share name) to unix-codepage for all of the
- * following tdb key generation */
fstrcpy(printer_name, lp_servicename(snum));
- dos_to_unix(printer_name, True);
/*
* Check to see if someone else is doing this update.
@@ -598,11 +594,9 @@ static BOOL is_owner(struct current_user *user, int jobid)
if (!pjob || !user) return False;
if ((vuser = get_valid_user_struct(user->vuid)) != NULL) {
- return strequal(pjob->user,
- unix_to_dos(vuser->user.smb_name,False));
+ return strequal(pjob->user, vuser->user.smb_name);
} else {
- return strequal(pjob->user,
- unix_to_dos(uidtoname(user->uid),False));
+ return strequal(pjob->user, uidtoname(user->uid));
}
}
@@ -752,7 +746,6 @@ static BOOL print_cache_expired(int snum)
time_t t2, t = time(NULL);
slprintf(key, sizeof(key)-1, "CACHE/%s", lp_servicename(snum));
- dos_to_unix(key, True); /* Convert key to unix-codepage */
t2 = tdb_fetch_int(tdb, key);
if (t2 == ((time_t)-1) || (t - t2) >= lp_lpqcachetime()) {
DEBUG(3, ("print cache expired\n"));
@@ -771,7 +764,6 @@ static int get_queue_status(int snum, print_status_struct *status)
ZERO_STRUCTP(status);
slprintf(keystr, sizeof(keystr)-1, "STATUS/%s", lp_servicename(snum));
- dos_to_unix(keystr, True); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen(keystr);
data = tdb_fetch(tdb, key);
@@ -888,9 +880,9 @@ int print_job_start(struct current_user *user, int snum, char *jobname)
fstrcpy(pjob.jobname, jobname);
if ((vuser = get_valid_user_struct(user->vuid)) != NULL) {
- fstrcpy(pjob.user, unix_to_dos(vuser->user.smb_name,False));
+ fstrcpy(pjob.user, vuser->user.smb_name);
} else {
- fstrcpy(pjob.user, unix_to_dos(uidtoname(user->uid),False));
+ fstrcpy(pjob.user, uidtoname(user->uid));
}
fstrcpy(pjob.qname, lp_servicename(snum));
@@ -1128,7 +1120,6 @@ int print_queue_status(int snum,
*/
ZERO_STRUCTP(status);
slprintf(keystr, sizeof(keystr)-1, "STATUS/%s", lp_servicename(snum));
- dos_to_unix(keystr, True); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen(keystr);
data = tdb_fetch(tdb, key);