diff options
author | Gerald Carter <jerry@samba.org> | 2004-03-15 15:16:29 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-03-15 15:16:29 +0000 |
commit | 12fb2d73050a911c7a86749be3639b2c1da84059 (patch) | |
tree | b14bfd5544cee791558141388f6acfbf16fea5fa /source3 | |
parent | 1287ce077be9e86baa444d1e439685bf83e45a9b (diff) | |
download | samba-12fb2d73050a911c7a86749be3639b2c1da84059.tar.gz samba-12fb2d73050a911c7a86749be3639b2c1da84059.tar.bz2 samba-12fb2d73050a911c7a86749be3639b2c1da84059.zip |
fix byte ordering problem when storing the updating pid for the lpq cache; was causing an abort in process_exists() on solaris
(This used to be commit ce49e4f2b904ab64ea98af4736147795669495df)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/printing/printing.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c index ad11108a5a..ed19c01f24 100644 --- a/source3/printing/printing.c +++ b/source3/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); |