diff options
author | Gerald Carter <jerry@samba.org> | 2004-06-23 15:46:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:01 -0500 |
commit | 087868c49916e96cf860577144bc19b799fd720e (patch) | |
tree | 2852c94848b5b270a69aba3f6980f194d9f0fc29 /source3/rpc_server | |
parent | adf65489bd358c4da73d3e5f23365ee2596dbe6d (diff) | |
download | samba-087868c49916e96cf860577144bc19b799fd720e.tar.gz samba-087868c49916e96cf860577144bc19b799fd720e.tar.bz2 samba-087868c49916e96cf860577144bc19b799fd720e.zip |
r1230: (merges from HP PSA) fixing a couple of caching bugs in the printing code. (a) make sure to clear jobs_changed list when deleting a job and, (b) invalidate the printer handle cache when we get a notification that something has changed on that printer
(This used to be commit e3d4fea7808abc77bfdb1a540ab18afe04af5030)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index a6d47a46c3..d8c6b5350c 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -5,7 +5,7 @@ * Copyright (C) Luke Kenneth Casson Leighton 1996-2000, * Copyright (C) Jean François Micouleau 1998-2000, * Copyright (C) Jeremy Allison 2001-2002, - * Copyright (C) Gerald Carter 2000-2003, + * Copyright (C) Gerald Carter 2000-2004, * Copyright (C) Tim Potter 2001-2002. * * This program is free software; you can redistribute it and/or modify @@ -312,6 +312,7 @@ void invalidate_printer_hnd_cache( char *printername ) for ( p=printers_list; p; p=p->next ) { if ( p->printer_type==PRINTER_HANDLE_IS_PRINTER + && p->printer_info && StrCaseCmp(p->dev.handlename, printername)==0) { DEBUG(10,("invalidating printer_info cache for handl:\n")); @@ -1188,6 +1189,12 @@ static void receive_notify2_message_list(int msg_type, pid_t src, void *msg, siz ZERO_STRUCT( notify ); notify2_unpack_msg( ¬ify, &msg_tv, msg_ptr, msg_len ); msg_ptr += msg_len; + + /* we don't know if the change was from us or not so kill + any cached printer objects */ + + if ( notify.type == PRINTER_NOTIFY_TYPE ) + invalidate_printer_hnd_cache( notify.printer ); /* add to correct list in container */ |