Proposed patch for source/printing/print_generic.c

Gerald (Jerry) Carter jerry at samba.org
Tue Nov 30 15:19:41 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Larry W. Finger wrote:
| 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));

Are yuou sure this is needed?  standard_sub_snum() will handle
the %I variable for you.









cheers, jerry
- ---------------------------------------------------------------------
Alleviating the pain of Windows(tm)      ------- http://www.samba.org
GnuPG Key                ----- http://www.plainjoe.org/gpg_public.asc
"If we're adding to the noise, turn off this song"--Switchfoot (2003)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBrI+NIR7qMdg1EfYRAiEBAJ0b16kzT9fmeOh1Y3UXln2fqhLllgCeILrD
geQFJ6DNp2J6rUt29xKDwBM=
=R3r7
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list