summaryrefslogtreecommitdiffstats
path: root/libvncserver
diff options
context:
space:
mode:
authorrunge <runge>2007-05-16 21:34:21 +0000
committerrunge <runge>2007-05-16 21:34:21 +0000
commitf7d48515fd685d759a6abecc1bb1877dc45d04e2 (patch)
tree95f12c096f72a4c5ba85affe1cd49c466bda5d12 /libvncserver
parent3110c0e32f2f1fe823917eebc33bedc44a84160c (diff)
downloadlibtdevnc-f7d48515fd685d759a6abecc1bb1877dc45d04e2.tar.gz
libtdevnc-f7d48515fd685d759a6abecc1bb1877dc45d04e2.zip
Add logging output to know when inside tightvnc-filetransfer functions.
Diffstat (limited to 'libvncserver')
-rw-r--r--libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c4
-rw-r--r--libvncserver/tightvnc-filetransfer/rfbtightserver.c15
2 files changed, 18 insertions, 1 deletions
diff --git a/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c b/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
index 2b9c3b2..2bd5ba1 100644
--- a/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
+++ b/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
@@ -70,6 +70,8 @@ InitFileTransfer()
if(fileTransferInitted)
return;
+
+ rfbLog("tightvnc-filetransfer/InitFileTransfer\n");
memset(ftproot, 0, sizeof(ftproot));
@@ -97,6 +99,8 @@ SetFtpRoot(char* path)
{
struct stat stat_buf;
DIR* dir = NULL;
+
+ rfbLog("tightvnc-filetransfer/SetFtpRoot\n");
if((path == NULL) || (strlen(path) == 0) || (strlen(path) > (PATH_MAX - 1))) {
rfbLog("File [%s]: Method [%s]: parameter passed is improper, ftproot"
diff --git a/libvncserver/tightvnc-filetransfer/rfbtightserver.c b/libvncserver/tightvnc-filetransfer/rfbtightserver.c
index d17f16c..e2c6594 100644
--- a/libvncserver/tightvnc-filetransfer/rfbtightserver.c
+++ b/libvncserver/tightvnc-filetransfer/rfbtightserver.c
@@ -59,6 +59,7 @@ static void
rfbVncAuthSendChallenge(rfbClientPtr cl)
{
+ rfbLog("tightvnc-filetransfer/rfbVncAuthSendChallenge\n");
/* 4 byte header is alreay sent. Which is rfbSecTypeVncAuth (same as rfbVncAuth). Just send the challenge. */
rfbRandomBytes(cl->authChallenge);
if (rfbWriteExact(cl, (char *)cl->authChallenge, CHALLENGESIZE) < 0) {
@@ -84,6 +85,8 @@ rfbProcessClientAuthType(rfbClientPtr cl)
int n, i;
rfbTightClientPtr rtcp = rfbGetTightClientData(cl);
+ rfbLog("tightvnc-filetransfer/rfbProcessClientAuthType\n");
+
if(rtcp == NULL)
return;
@@ -155,6 +158,8 @@ rfbSendAuthCaps(rfbClientPtr cl)
int count = 0;
rfbTightClientPtr rtcp = rfbGetTightClientData(cl);
+ rfbLog("tightvnc-filetransfer/rfbSendAuthCaps\n");
+
if(rtcp == NULL)
return;
@@ -199,6 +204,8 @@ rfbSendTunnelingCaps(rfbClientPtr cl)
rfbTunnelingCapsMsg caps;
uint32_t nTypes = 0; /* we don't support tunneling yet */
+ rfbLog("tightvnc-filetransfer/rfbSendTunnelingCaps\n");
+
caps.nTunnelTypes = Swap32IfLE(nTypes);
if (rfbWriteExact(cl, (char *)&caps, sz_rfbTunnelingCapsMsg) < 0) {
rfbLogPerror("rfbSendTunnelingCaps: write");
@@ -245,6 +252,8 @@ rfbSendInteractionCaps(rfbClientPtr cl)
intr_caps.nEncodingTypes = Swap16IfLE(N_ENC_CAPS);
intr_caps.pad = 0;
+ rfbLog("tightvnc-filetransfer/rfbSendInteractionCaps\n");
+
/* Supported server->client message types. */
/* For file transfer support: */
i = 0;
@@ -337,7 +346,7 @@ handleMessage(rfbClientPtr cl,
{
rfbTightClientPtr data;
- rfbLog("%s message received\n", messageName);
+ rfbLog("tightvnc-filetransfer: %s message received\n", messageName);
if((IsFileTransferEnabled() == FALSE) || ( cl->viewOnly == TRUE)) {
rfbCloseClient(cl);
@@ -425,6 +434,8 @@ rfbTightUsage(void) {
int
rfbTightProcessArg(int argc, char *argv[]) {
+ rfbLog("tightvnc-filetransfer/rfbTightProcessArg\n");
+
InitFileTransfer();
if(argc<1)
@@ -453,6 +464,8 @@ rfbTightProcessArg(int argc, char *argv[]) {
void
rfbHandleSecTypeTight(rfbClientPtr cl) {
+ rfbLog("tightvnc-filetransfer/rfbHandleSecTypeTight\n");
+
rfbTightClientPtr rtcp = (rfbTightClientPtr) malloc(sizeof(rfbTightClientRec));
if(rtcp == NULL) {