[PATCH] kvdr + vdradmin, autotimer, etc. am rpc port, unblockiert

  • tach,


    wens auch ankotzt, dass kvdr ständig den rpc port des vdr blockiert, kanns hiermit probieren.


    ACHTUNG: quick+dirty, syncron-c/s, port auf 2001 fest, CheckClippingTimerSlot() verstümmelt. wer bock und zeit hat kanns ja mitm timer machen und den port vom configobjekt direkt zum rpc-object rüberschmeissen.


    + minimale rpc benutzungszeit am vdr
    - geringe verzögerungen beim zappen und tippen
    -- womöglich x-server crash u.U. , keine Ahnung was da in CheckClippingTimerSlot() mit dem overlay gemacht wird.


    --- kvdr-0.63/kvdr/kvdr/kvdr.cpp 2004-08-07 09:55:07.000000000 +0200
    +++ kvdr/kvdr/kvdr.cpp 2005-01-31 15:56:45.000000000 +0100
    @@ -253,7 +253,7 @@

    //open the connection to vdr:
    svdrpc=new cSVDRPC();
    - svdrpc->Open(vdr_port);
    + //svdrpc->Open(vdr_port);
    //decide which mixer to use dvb or sound card
    if (args->isSet("a"))
    @@ -1936,12 +1936,12 @@
    XvSLOT();
    }
    #endif
    - if(!svdrpc->Connected())
    +/* if(!svdrpc->Connected())
    {
    if(!vdr_mb_shown) //show only one message box ...
    {
    vdr_mb_shown=true;
    - if(chk_cnt>3)
    + if(chk_cnt>10)
    {
    QMessageBox::critical(this,"kvdr:",i18n("could not connect to vdr-daemon,\n"\
    "check if vdr is running,\n"\
    @@ -1976,7 +1976,7 @@
    }
    vdr_mb_shown=false;
    }
    - }
    + }*/
    if(!isXv)
    {
    //copy clipping-array for comparison



    --- kvdr-0.63/kvdr/kvdr/svdrpc.cpp 2004-02-25 18:11:43.000000000 +0100
    +++ kvdr/kvdr/svdrpc.cpp 2005-01-31 14:09:30.000000000 +0100
    @@ -145,15 +145,15 @@
    }
    if (!ret) //if we could not write or did'nt get a reply
    {
    - //perror("svdrpc-write:");
    - Close();//reopen connection in the case something went wrong:
    + // perror("svdrpc-write:");
    + /*Close();//reopen connection in the case something went wrong:
    if (socket.Open(port))
    filedes = socket.Connect();
    else
    - filedes = -1;
    + filedes = -1;*/
    outstandingReply=1;
    //ReadReply();//lese Greeting...
    - if(retrycount++<3) goto retry;//we try again 3 times, if it does not work we have probably someone else using the port!
    + if(retrycount++<100) goto retry;//we try again 3 times, if it does not work we have probably someone else using the port!
    ret=false;
    }
    }
    @@ -215,11 +215,20 @@
    //------------------------------------------------------------------------------------------
    bool cSVDRPC::CmdTKey(const char *key)
    {
    + int w=0;
    + bool result=false;
    char *Option=NULL;
    - asprintf(&Option,"HITK %s\r\n",key);
    - bool result=Send(Option);
    - ReadReply();
    - delete Option;
    + Open(2001);
    + while (!(result=Connected()) && (w++ < 1000)){} w=0;
    + if (!result) perror("cSVDRPC::CmdTKey::!Connected");
    + asprintf(&Option,"HITK %s\r\n",key);
    + if (!Send(Option)) perror("cSVDRPC::CmdTKey::!Send");
    + while (outstandingReply && (w++ < 1000)){result=ReadReply();} w=0;
    + if (!result) perror("cSVDRPC::CmdTKey::!ReadReply");
    + delete Option;
    + while (!(result=CmdQuit()) && (w++ < 1000)){}
    + if (!result) perror("cSVDRPC::CmdTKey::!CmdQuit");
    + Close();
    return result;
    }

    VDR1: yavdr ppa VDR 2.0.6 auf iBase Industrial Mini-ITX MB896IL +DVI- Modul +Gb Ethernet Mini-PCI Motherboard, Pentium M 740, 1GB RAM, mit 3x KNC1 C+/MK3 PCI auf LSI Logic 3x PCI-64 Rev. 2.3 Intel 21154 aktive Riser Card 2135-5V mit abgesägtem 64Bit- Steckerteil im PCI- Slot auf upriser,
    HDTV xineliboutput mit xine-plugin-crystalhd für Broadcom CrystalHD BCM970015 auf 15cm PCI-E 1x Flachbandriser im PCI-E 1x v.1.0a Slot.
    IPTV vdr-plugin-iptv und ffmpeg als rtsp/rtmp/hls "tuner frontend", stream sanitizer und mpegts wrapper.

    2 Mal editiert, zuletzt von woprr ()

  • vergessen! hatte alte infos.


    vdr 1.3.17 hat ne rpc timeout option.


    nicht auf 0 setzen ;)

    VDR1: yavdr ppa VDR 2.0.6 auf iBase Industrial Mini-ITX MB896IL +DVI- Modul +Gb Ethernet Mini-PCI Motherboard, Pentium M 740, 1GB RAM, mit 3x KNC1 C+/MK3 PCI auf LSI Logic 3x PCI-64 Rev. 2.3 Intel 21154 aktive Riser Card 2135-5V mit abgesägtem 64Bit- Steckerteil im PCI- Slot auf upriser,
    HDTV xineliboutput mit xine-plugin-crystalhd für Broadcom CrystalHD BCM970015 auf 15cm PCI-E 1x Flachbandriser im PCI-E 1x v.1.0a Slot.
    IPTV vdr-plugin-iptv und ffmpeg als rtsp/rtmp/hls "tuner frontend", stream sanitizer und mpegts wrapper.

    Einmal editiert, zuletzt von woprr ()

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!