{
fstring key;
slprintf(key, sizeof(key), "CACHE/%s", lp_servicename(snum));
+ dos_to_unix(key, True); /* Convert key to unix-codepage */
tdb_store_int(tdb, key, -1);
}
struct traverse_struct tstruct;
fstring keystr, printer_name;
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);
/*
* Update the cache time FIRST ! Stops others doing this
/* store the new queue status structure */
slprintf(keystr, sizeof(keystr), "STATUS/%s", printer_name);
- key.dptr = keystr;
+ key.dptr = keystr;
key.dsize = strlen(keystr);
status.qcount = qcount;
time_t t2, t = time(NULL);
slprintf(key, sizeof(key), "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"));
ZERO_STRUCTP(status);
slprintf(keystr, sizeof(keystr), "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);
*/
ZERO_STRUCTP(status);
slprintf(keystr, sizeof(keystr), "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);
int njobs, i;
njobs = print_queue_status(snum, &queue, &status);
- for (i=0;i<njobs;i++) {
- if (print_access_check(user, snum, PRINTER_ACCESS_ADMINISTER)) {
+
+ if (print_access_check(user, snum, PRINTER_ACCESS_ADMINISTER)) {
+ for (i=0;i<njobs;i++) {
print_job_delete1(queue[i].job);
}
}