git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fa2c40
)
fix byte ordering problem when storing the updating pid for the lpq cache; was causin...
author
Gerald Carter
<jerry@samba.org>
Mon, 15 Mar 2004 15:06:33 +0000
(15:06 +0000)
committer
Gerald Carter
<jerry@samba.org>
Mon, 15 Mar 2004 15:06:33 +0000
(15:06 +0000)
source/printing/printing.c
patch
|
blob
|
history
diff --git
a/source/printing/printing.c
b/source/printing/printing.c
index ad11108a5afdf08537c7c7ceaf430ae7fc89665d..ed19c01f2439e57efc8cca24cb65b8cc6123d8b4 100644
(file)
--- a/
source/printing/printing.c
+++ b/
source/printing/printing.c
@@
-818,6
+818,8
@@
static void set_updating_pid(const fstring printer_name, BOOL delete)
TDB_DATA key;
TDB_DATA data;
pid_t updating_pid = sys_getpid();
+ uint8 buffer[4];
+
struct tdb_print_db *pdb = get_print_db_byname(printer_name);
if (!pdb)
@@
-833,8
+835,9
@@
static void set_updating_pid(const fstring printer_name, BOOL delete)
return;
}
- data.dptr = (void *)&updating_pid;
- data.dsize = sizeof(pid_t);
+ SIVAL( buffer, 0, updating_pid);
+ data.dptr = (void *)buffer;
+ data.dsize = 4; /* we always assume this is a 4 byte value */
tdb_store(pdb->tdb, key, data, TDB_REPLACE);
release_print_db(pdb);