Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: vdr-1.1.30 + autopid-1-untested



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

thx andreas,

nice solution, well, 0x4001 looks nice, but the decimal value IMHO 
look so big ;-)

i added my patch here, where i do save the channels.conf after modification ..
don't you love it ?

i guess it is nice, so after a crash, channels.conf is uptodate ..

thx, sven

- -- 
health & wealth
mailto:sgoethel@jausoft.com
www   : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/
voice : +49-5121-999600 ; fax : +49-5121-999602
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+uFH1HdOA30NoFAARAkWaAJ4uN7HV9wF3kHLlLNQTZXSrtZhj7QCgv6Ob
E/A6pNL+5LHAlMAfq5orSlk=
=ftH5
-----END PGP SIGNATURE-----
--- eit.c-old	2003-05-06 05:06:01.000000000 +0200
+++ eit.c	2003-05-06 05:23:41.000000000 +0200
@@ -1523,6 +1523,7 @@
 cChannel *cSIProcessor::updateChannelInfo(int Source, int Transponder, int Nid, int Tid, int Sid, char *name, bool forceUpdate)
 {
     cChannel *channel = NULL;
+    int channelsModified = 0;
 
     const cNetworkTransponder* ntid = NetworkTransponders.getByNidTid(Source, Nid, Tid);
     const cTransponder *transponder = NULL;
@@ -1547,13 +1548,20 @@
 		   Source, transponder->Frequency(), Nid, Tid, Sid, name);
 	    channel->Name(name);
 	    channel->setTransponder(transponder);
+	    channelsModified = 1;
 	} else if (!channel) {
 	    printf("New Channel: %d %d  %d %d %d  \"%s\"\n",
 		   Source, transponder->Frequency(), Nid, Tid, Sid, name);
 	    channel = new cNewChannel(Source, transponder, Nid, Tid, Sid, name);
+	    channel->Rid(0x4001);
 	    Channels.AddChannel(channel);
+	    channelsModified = 1;
 	}
     }
+
+    if ( channelsModified )
+	  Channels.Save();
+
     return channel;
 }
 
@@ -1570,6 +1578,8 @@
     int *apid_p = apid;
     int *dpid_p = dpid;
 
+    int channelsModified = 0;
+
     if (!pi) return;
     
     memset(apid, 0, sizeof(apid));
@@ -1649,6 +1659,7 @@
 		printf("update pids: %s:%d:%d,%d:%d,%d:%d\n", channel->Name(),
 		       channel->Vpid(), channel->Apid1(), channel->Apid2(),
 		       channel->Dpid1(), channel->Dpid2(), channel->Tpid());
+	        channelsModified = 1;
         }
     }
     if (eSid != pendingSid)
@@ -1656,8 +1667,12 @@
 	    if (Setup.updateServices == 2 || (channel->Rid() & 0x4002) == 0x4002) {
 		    //printf("setting eSid for channel\n");
 		    channel->eSid(eSid);
+	            channelsModified = 1;
             }
         }
+
+   if ( channelsModified )
+	  Channels.Save();
 }
 
 /** */

Home | Main Index | Thread Index