[Samba] How to Refresh jobs in samba queues ??

jra at dp.samba.org jra at dp.samba.org
Fri Nov 8 18:01:02 GMT 2002


On Fri, Nov 08, 2002 at 12:54:00PM -0500, daniel.jarboe at custserv.com wrote:
> No help for you, but I have the same problem and would also be 
> interested in any responses.
> 
> ~ Daniel
> 
> fruza at yahoo.com wrote:
> 
> > Hi all,
> > 
> > I have working properly a print server with
> > samba-2.2.6 and using the printing system lprng. I
> > have just the following problem, when I open the
> > window queue to see the   jobs in it from Win2K and
> > WinNT workstation the queues are not refreshing, I
> > have to push F5 key continously to refresh the queue
> > jobs information. 
> > 
> > Is there a way in samba or windows (I don't know where
> > is the origin of the problem) so that it refreshs
> > automaticly every n seconds ??

Can you try this patch please (I'm checking this out for 2.2.7).

This was written by JimV at metrics.com.

Jeremy.

--- source/printing/printing.c.orig     Thu Nov  7 11:41:12 2002
+++ source/printing/printing.c  Thu Nov  7 12:33:02 2002
@@ -347,12 +347,19 @@

 static void send_queue_message(const char *printer_name, uint32 high, uint32 low)
 {
-       char msg[8 + sizeof(fstring)];
-       SIVAL(msg,0,low);
-       SIVAL(msg,4,high);
-       fstrcpy(&msg[8], printer_name);
+       char msg[sizeof(PRINTER_MESSAGE_INFO)];
+       PRINTER_MESSAGE_INFO info;

-       message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, 8 + strlen(printer_name) + 1, False, NULL);
+       ZERO_STRUCT(info);
+
+       info.low = low;
+       info.high = high;
+       info.flags = 0;
+       fstrcpy(info.printer_name, printer_name);
+
+       memcpy( msg, &info, sizeof(PRINTER_MESSAGE_INFO));
+
+       message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, sizeof(PRINTER_MESSAGE_INFO), False, NULL);
 }

 /****************************************************************************




More information about the samba mailing list