? network/miniSAPserver/sapserver
Index: network/miniSAPserver/message.cpp
===================================================================
RCS file: /var/cvs/videolan/network/miniSAPserver/message.cpp,v
retrieving revision 1.2
diff -u -r1.2 message.cpp
--- network/miniSAPserver/message.cpp	25 May 2003 16:36:00 -0000	1.2
+++ network/miniSAPserver/message.cpp	25 May 2003 19:29:36 -0000
@@ -145,7 +145,7 @@
         fprintf(stderr, "Non permanent program not supported ...\n");
         fprintf(stderr, "Announcing permanent session instead\n");
     }
-    string m="m=audio 1234 udp 14\n";
+    string m="m=audio "+p->GetPort()+" udp 14\n";
     string c="c=IN IP4 "+p->GetAddress()+"/15\n";
     // TODO ttl type should be specified
     string a="a=type:test\n";
Index: network/miniSAPserver/parser.cpp
===================================================================
RCS file: /var/cvs/videolan/network/miniSAPserver/parser.cpp,v
retrieving revision 1.1
diff -u -r1.1 parser.cpp
--- network/miniSAPserver/parser.cpp	22 May 2003 02:22:45 -0000	1.1
+++ network/miniSAPserver/parser.cpp	25 May 2003 19:29:36 -0000
@@ -161,6 +161,10 @@
             if(something)
             {
                 /* We were in a program with at least one field filled */
+		if (!pp->GetPort().length())
+		{
+		  pp->SetPort("1234");
+		}
                 Programs.push_back(pp);
                 pp=new Program();
                 something=0;
@@ -201,8 +205,23 @@
             something=1;
             pp->SetAddress(tline);
         }
+	if(strstr(line,"port="))
+	{
+	    strgeta(line,tline,'=');
+	    something=1;
+	    pp->SetPort(tline);
+	}
     }
 
-    if(something) Programs.push_back(pp);
+    if(something) 
+    {
+ 
+     if (!pp->GetPort().length())
+     {
+          pp->SetPort("1234");
+     }
+    
+     Programs.push_back(pp);
+    }
     return(0);
 }
Index: network/miniSAPserver/program.cpp
===================================================================
RCS file: /var/cvs/videolan/network/miniSAPserver/program.cpp,v
retrieving revision 1.2
diff -u -r1.2 program.cpp
--- network/miniSAPserver/program.cpp	25 May 2003 16:36:00 -0000	1.2
+++ network/miniSAPserver/program.cpp	25 May 2003 19:29:36 -0000
@@ -45,6 +45,7 @@
 string Program::GetMachine(void) {return machine;}
 string Program::GetSite(void) {return site;}
 string Program::GetAddress(void){return address;}
+string Program::GetPort(void){return port;}
 bool   Program::IsPermanent(void){return permanent;}
 
 void Program::SetName(char* n){name=n;}
@@ -52,13 +53,15 @@
 void Program::SetMachine(char* m){machine=m;}
 void Program::SetSite(char* s){site=s;}
 void Program::SetAddress(char* a){address=a;}
+void Program::SetPort(char* p){port=p;}
 
-Program::Program(string n, string u, string m, string s, string a)
+Program::Program(string n, string u, string m, string s, string a,string p)
 {
     name=n;
     user=u;
     machine=m;
     site=s;
     address=a;
+    port=p;
     permanent=true;
 }
Index: network/miniSAPserver/program.h
===================================================================
RCS file: /var/cvs/videolan/network/miniSAPserver/program.h,v
retrieving revision 1.2
diff -u -r1.2 program.h
--- network/miniSAPserver/program.h	25 May 2003 16:36:00 -0000	1.2
+++ network/miniSAPserver/program.h	25 May 2003 19:29:36 -0000
@@ -25,7 +25,7 @@
 class Program
 {
   public:
-    Program(string, string, string, string, string);
+    Program(string, string, string, string, string,string);
     Program();
     ~Program();
     string GetName();
@@ -33,11 +33,13 @@
     string GetMachine();
     string GetSite();
     string GetAddress();
+    string GetPort();
     void SetName(char*);
     void SetUser(char*);
     void SetMachine(char*);
     void SetSite(char*);
     void SetAddress(char*);
+    void SetPort(char *);
     bool IsPermanent();
 
   private:
@@ -46,6 +48,7 @@
     string machine;
     string site;
     string address;
+    string port;
     bool permanent;
     uint32_t start_time;
     uint32_t stop_time;
Index: network/miniSAPserver/sap.cfg
===================================================================
RCS file: /var/cvs/videolan/network/miniSAPserver/sap.cfg,v
retrieving revision 1.7
diff -u -r1.7 sap.cfg
--- network/miniSAPserver/sap.cfg	18 May 2003 11:58:59 -0000	1.7
+++ network/miniSAPserver/sap.cfg	25 May 2003 19:29:36 -0000
@@ -13,6 +13,7 @@
 machine=vlcs.via.ecp.fr # Name of the streaming machine
 site=www.videolan.org # Site of the streaming entity
 address=239.255.12.12 # Multicast IP address of the program
+port=20000
 
 [program]
 name=TV2
