[Verse-cvs] [verse] SVN commit:[4528] Example program list-nodes accpets 2 parametres now, hostname and username .
Jiri Hnidek
jiri.hnidek at tul.cz
Fri Jul 18 10:20:26 CEST 2008
Revision: 4528
https://svn.blender.org//revision/?rev=4528&view=rev
Author: jiri
Date: 2008-07-18 10:20:25 +0200 (Fri, 18 Jul 2008)
Log Message:
-----------
Example program list-nodes accpets 2 parametres now, hostname and username. Useful for testing IPv6.
Modified Paths:
--------------
branches/verse-pam-branch/examples/list-nodes.c
Modified: branches/verse-pam-branch/examples/list-nodes.c
===================================================================
--- branches/verse-pam-branch/examples/list-nodes.c 2008-07-17 13:45:40 UTC (rev 4527)
+++ branches/verse-pam-branch/examples/list-nodes.c 2008-07-18 08:20:25 UTC (rev 4528)
@@ -44,9 +44,11 @@
{
char buf[1024];
#if defined _WIN32
+ char *hostname = "localhost";
char *username = "username";
char *password = "password";
#else
+ char *hostname = NULL;
char *username = NULL;
char *pass = NULL;
#endif
@@ -60,11 +62,12 @@
/* I'm not sure, if getpass() is available at Windows. */
#else
/* get username and password from user */
- if(argc == 2) {
- username = argv[1];
+ if(argc == 3) {
+ hostname = argv[1];
+ username = argv[2];
}
else {
- printf("Syntax: %s <username>\n", argv[0]);
+ printf("Syntax: %s <hostname> <username>\n", argv[0]);
return EXIT_FAILURE;
}
@@ -76,7 +79,7 @@
if(pass!=NULL) {
/* Kick off program by connecting to Verse host on local machine. */
- verse_send_connect(username, pass, "localhost", NULL);
+ verse_send_connect(username, pass, hostname, NULL);
while(TRUE)
verse_callback_update(10000); /* Listen to network, get callbacks. */
More information about the Verse-cvs
mailing list