Commit f385644f authored by 's avatar
Browse files

git-svn-id: file:///home/svn/mapi/trunk@567 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent acc53891
......@@ -10,7 +10,8 @@ int main(int argc, char *argv[])
int fd;
int fid;
int limit = 0;
unsigned int i;
int i = 0;
char username[1024], password[1024], vo[1024];
mapi_results_t *dres;
if(!argv[1] || !argv[2])
......@@ -29,8 +30,15 @@ int main(int argc, char *argv[])
printf("\nCount not create flow\n");
return -1;
}
printf("\nUsername: ");
scanf("%s", username);
printf("\nPassword: ");
scanf("%s", password);
printf("\nVO: ");
scanf("%s", vo);
if(mapi_authenticate(fd, "gvasil", "gvasil", "DCS"))
if(mapi_authenticate(fd, username, password, vo))
{
fprintf(stderr, "Authentication failed.\n");
return(-1);
......@@ -48,11 +56,10 @@ int main(int argc, char *argv[])
while(1)
{
/* dres = mapi_read_results(fd,fid);
dres = mapi_read_results(fd,fid);
for (i=0; i<mapi_get_scope_size(fd); i++){
if(*((int*)dres[i].res)==0){
//printf("host %s: ",dres[i].res);
printf("host %d: ",i);
printf("host %s ... ", argv[1]);
printf("File written.\n");
mapi_close_flow(fd);
exit(0);
......@@ -61,7 +68,7 @@ int main(int argc, char *argv[])
{
usleep(10);
}
}*/
}
sleep(2);
}
mapi_close_flow(fd);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment