Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] autopid .. conditional, if rid==9999
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
how about just adding the conditional update, e.g.:
if ( ( channel && channel->rid==9999 ) || !channel )
so rid must be 9999, or the channel is new ..
how about this ? (-> patch attached, against 1.1.29-autopid-2)
and how to easy avoid scanning at all, if rid != 9999 ?
or ain't it much time consuming ...
cheers, 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+sHAyHdOA30NoFAARAis0AJ9QZIN+x2LUugHUqp3mK8ED2sTOzQCgsaYn
aZs2l5No43hZ08dclQf0Saw=
=uvtg
-----END PGP SIGNATURE-----
--- eit.c-old 2003-05-01 02:42:19.000000000 +0200
+++ eit.c 2003-05-01 02:35:55.000000000 +0200
@@ -1501,6 +1501,7 @@
cChannel *cSIProcessor::updateChannelInfo(int Source, int Transponder, int oNid, int TSid, int Sid, char *name)
{
cChannel *channel = NULL;
+ int channelsModified = 0;
const cNetworkTransponder* ntid = NetworkTransponders.getByNidTid(Source, oNid, TSid);
const cTransponder *transponder = NULL;
@@ -1519,13 +1520,17 @@
channel->tid = TSid;
}
}
- printf("updateChannel: %d %d %d %d %d \"%s\"\n", Source, transponder->Frequency(), oNid, TSid, Sid, name);
- if (channel) {
+
+ if (channel && channel->rid==9999) {
+ printf("Update Channel: %d %d %d %d %d \"%s\"\n", Source, transponder->Frequency(), oNid, TSid, Sid, name);
//FIXME: make this conditional??:
strn0cpy(channel->name, name, sizeof(channel->name));
channel->setTransponder(transponder);
- } else {
+
+ channelsModified = 1;
+ } else if (!channel) {
+ printf("New Channel: %d %d %d %d %d \"%s\"\n", Source, transponder->Frequency(), oNid, TSid, Sid, name);
channel = new cChannel();
channel->setTransponder(transponder);
strn0cpy(channel->name, name, sizeof(channel->name));
@@ -1538,9 +1543,16 @@
channel->apid1 = channel->apid2 = 0;
channel->dpid1 = channel->dpid2 = 0;
channel->sid = Sid;
+ channel->ca = 101;
Channels.AddChannel(channel);
+
+ channelsModified = 1;
}
}
+
+ if ( channelsModified )
+ Channels.Save();
+
return channel;
}
@@ -1548,14 +1560,16 @@
{
struct Descriptor *d;
- int index;
- int vpid;
- int ppid;
+ int index=0;
+ int vpid=0;
+ int ppid=0;
int apid[8];
int dpid[8];
- int tpid;
+ int tpid=0;
int *apid_p = apid;
int *dpid_p = dpid;
+
+ int channelsModified = 0;
if (!pi) return;
@@ -1623,19 +1637,32 @@
//FIXME: this has to die
if (cChannel *channel = Channels.GetByTransponderSid(currentSource, currentTransponder, eSid)) {
- channel->tpid = tpid;
- channel->vpid = vpid;
- channel->ppid = ppid;
- channel->apid1 = apid[0];
- channel->apid2 = apid[1];
- channel->dpid1 = dpid[0];
- channel->dpid2 = dpid[1];
+ if (channel->rid==9999) {
+ if(tpid>=0)
+ channel->tpid = tpid;
+ channel->vpid = vpid;
+ if( vpid!=ppid )
+ channel->ppid = ppid;
+ channel->apid1 = apid[0];
+ channel->apid2 = apid[1];
+ channel->dpid1 = dpid[0];
+ channel->dpid2 = dpid[1];
+
+ channelsModified = 1;
+ }
}
if (eSid != pendingSid)
if (cChannel *channel = Channels.GetByTransponderSid(currentSource, currentTransponder, pendingSid)) {
- //printf("setting eSid for channel\n");
- channel->esid = eSid;
+ if (channel->rid==9999) {
+ //printf("setting eSid for channel\n");
+ channel->esid = eSid;
+
+ channelsModified = 1;
+ }
}
+
+ if ( channelsModified )
+ Channels.Save();
}
/** */
Home |
Main Index |
Thread Index