[AG-TECH] Re: Use of vtc to label video feeds
Christoph Willing
chris at vislab.usyd.edu.au
Sat Sep 22 05:35:11 CDT 2001
Further to my earlier email & patch for adding arguments when
running vtc, I've since found that although the patch is fine
for a video bridge session using vic, it doesn't work with rat
which is fussier about the order of arguments applied to it.
In that case, since we're generally only running one instance
of rat, the .RTPdefaults solution works well.
However, just for completeness, below is a new patch to the original
vtc.c which works with rat as well as vic sessions started via vtc.
Regards,
chris
>
>The default value for the name is stored in a file .RTPdefaults in your
>home directory. It looks something like this:
>
(patch)
*** vtc.c.orig Thu Feb 26 07:23:06 1998
--- vtc.c Sat Sep 22 20:17:55 2001
***************
*** 63,68 ****
--- 63,70 ----
char * meeting_name = NULL;
char * password = NULL;
+ char *largs[100];
+
main(argc,argv)
int argc;
char **argv;
***************
*** 107,112 ****
--- 109,128 ----
exit(1);
}
meeting_name = strdup(argv[1]);
+
+ if( argc > 4 )
+ {
+ int i;
+
+ /* Save our additional local arguments */
+ for(i=0;argv[i+4];i++)
+ {
+ largs[i] = strdup(argv[i+4]);
+ }
+ largs[i] = NULL;
+ argc = 4;
+ }
+
if( argc != 4) {
/* assume they did not input password */
password = getpass("Input your password ( or return if no password needed for this meeting) : ");
***************
*** 354,370 ****
if((active_commands[next_active_index].pid=fork()) == 0) {
int count = 0;
char *myargv[100];
close(s_fid);
printf("%s",cmd);
! for(cmd+=strspn(cmd," \t\n"); *cmd!='\0';
! cmd+=strspn(cmd," \t\n")) {
myargv[count++] = cmd;
myargv[count] = NULL;
cmd += strcspn(cmd," \t\n");
if(*cmd)
*cmd++ = '\0';
}
execvp(myargv[0],&myargv[0]);
perror("execv");
exit(next_active_index);
--- 370,401 ----
if((active_commands[next_active_index].pid=fork()) == 0) {
int count = 0;
char *myargv[100];
+ char *maddr;
close(s_fid);
printf("%s",cmd);
! for(cmd+=strspn(cmd," \t\n"); *cmd!='\0'; cmd+=strspn(cmd," \t\n"))
! {
myargv[count++] = cmd;
myargv[count] = NULL;
cmd += strcspn(cmd," \t\n");
if(*cmd)
*cmd++ = '\0';
}
+
+ /* Save the address/port argument */
+ maddr = strdup(myargv[--count]);
+
+ /* Add our local arguments */
+ for(i=0;largs[i];i++)
+ {
+ myargv[count++] = largs[i];
+ myargv[count] = NULL;
+ }
+ /* Put back the address/port argument */
+ myargv[count++] = maddr;
+ myargv[count] = NULL;
+
execvp(myargv[0],&myargv[0]);
perror("execv");
exit(next_active_index);
***************
*** 448,450 ****
--- 479,482 ----
}
fclose(fid);
}
+
(patch done)
_______________________________________________________________
Chris Willing Telephone (61-2) 9351 3005
VisLab, A28 Facsimile (61-2) 9351 1880
University of Sydney
NSW 2006 Australia http://www.vislab.usyd.edu.au
More information about the ag-tech
mailing list