X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftestclient%2Fmain.cpp;h=57f61974c725d9e7e54e461fbe5e83b146e03b57;hb=142d9730b03e137b8cf5b11c2435e5544ea235dc;hp=34fd38730821fd78e7e2c2f6045ad29344d62bde;hpb=cc938f166e50b0c9e4fdccf55e0a8cffb2c56602;p=deb_libcec.git diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index 34fd387..57f6197 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -774,14 +774,19 @@ bool ProcessCommandR(ICECAdapter *parser, const string &command, string & UNUSED { if (command == "r") { + bool bReactivate = parser->IsLibCECActiveSource(); + PrintToStdOut("closing the connection"); parser->Close(); PrintToStdOut("opening a new connection"); parser->Open(g_strPort.c_str()); - PrintToStdOut("setting active source"); - parser->SetActiveSource(); + if (bReactivate) + { + PrintToStdOut("setting active source"); + parser->SetActiveSource(); + } return true; }