summaryrefslogtreecommitdiffstats
path: root/client_examples/ppmtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'client_examples/ppmtest.c')
-rw-r--r--client_examples/ppmtest.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/client_examples/ppmtest.c b/client_examples/ppmtest.c
index b8602f0..99ee595 100644
--- a/client_examples/ppmtest.c
+++ b/client_examples/ppmtest.c
@@ -58,12 +58,27 @@ static void SaveFramebufferAsPPM(rfbClient* client, int x, int y, int w, int h)
fclose(f);
}
+char * getuser(rfbClient *client)
+{
+return strdup("testuser@test");
+}
+
+char * getpassword(rfbClient *client)
+{
+return strdup("Password");
+}
+
int
main(int argc, char **argv)
{
rfbClient* client = rfbGetClient(8,3,4);
time_t t=time(NULL);
+#ifdef LIBVNCSERVER_HAVE_SASL
+ client->GetUser = getuser;
+ client->GetPassword = getpassword;
+#endif
+
if(argc>1 && !strcmp("-print",argv[1])) {
client->GotFrameBufferUpdate = PrintRect;
argv[1]=argv[0]; argv++; argc--;