When giving authorisation errors from the proxy code in x11fwd.c,
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 23 Apr 2009 17:39:36 +0000 (17:39 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 23 Apr 2009 17:39:36 +0000 (17:39 +0000)
name the proxy using the global 'appname' variable, instead of
statically calling it PuTTY.

(Knock-on effect is that PSCP and PSFTP have to declare that
variable, though of course they shouldn't ever actually _use_ the X
forwarding code. Probably I ought to replace it with a stub
nox11fwd.c for those applications.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@8501 cda61777-01e9-0310-a592-d414129be87e

pscp.c
psftp.c
x11fwd.c

diff --git a/pscp.c b/pscp.c
index 8693668..ab3077b 100644 (file)
--- a/pscp.c
+++ b/pscp.c
@@ -50,6 +50,8 @@ static void source(char *src);
 static void rsource(char *src);
 static void sink(char *targ, char *src);
 
+const char *const appname = "PSCP";
+
 /*
  * The maximum amount of queued data we accept before we stop and
  * wait for the server to process some.
diff --git a/psftp.c b/psftp.c
index fe01b1a..e0fbee8 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -16,6 +16,8 @@
 #include "sftp.h"
 #include "int64.h"
 
+const char *const appname = "PSFTP";
+
 /*
  * Since SFTP is a request-response oriented protocol, it requires
  * no buffer management: when we send data, we stop and wait for an
index ba76f78..d674120 100644 (file)
--- a/x11fwd.c
+++ b/x11fwd.c
@@ -712,7 +712,7 @@ int x11_send(Socket s, char *data, int len)
            int msglen, msgsize;
            unsigned char *reply;
 
-           message = dupprintf("PuTTY X11 proxy: %s", err);
+           message = dupprintf("%s X11 proxy: %s", appname, err);
            msglen = strlen(message);
            reply = snewn(8 + msglen+1 + 4, unsigned char); /* include zero */
            msgsize = (msglen + 3) & ~3;