Proposed patch for source/printing/print_generic.c

Larry W. Finger Larry.Finger at lwfinger.net
Mon Nov 22 02:20:17 GMT 2004


Hi,

In my application, I have a Windows server process that interacts with a 
Linux client to inform the Windows user that their job was received. For 
this to work, I need to have the IP address of the print client. To do 
this, I added the following one-line patch to 
source/printing/print_generic.c that enables the macro %I. If possible, I 
would like it to become a standard part of the official release. As can be 
seen, the patch is for release 3.0.8.

--- samba-3.0.8/source/printing/print_generic.c_orig	2004-11-21 
18:52:33.893097040 -0600
+++ samba-3.0.8/source/printing/print_generic.c	2004-11-19 
17:47:05.000000000 -0600
@@ -53,6 +53,7 @@
  	va_end(ap);

  	pstring_sub( syscmd, "%p", printername );
+	string_sub( syscmd, "%I", client_addr(), 1);	/* Add IP address to print 
command */

  	if ( do_sub && snum != -1 )
  		standard_sub_snum(snum,syscmd,sizeof(syscmd));

Thanks,

Larry Finger



More information about the samba-technical mailing list