Ticket #876: mythtv_remoteblock.patch
File mythtv_remoteblock.patch, 2.5 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/remoteutil.cpp
351 351 { 352 352 QStringList strlist = "QUERY_ISRECORDING"; 353 353 354 if (!gContext->SendReceiveStringList(strlist ))354 if (!gContext->SendReceiveStringList(strlist, false, false)) 355 355 return -1; 356 356 357 357 return strlist[0].toInt(); -
libs/libmyth/mythcontext.h
359 361 QPixmap *LoadScalePixmap(QString filename, bool fromcache = true); 360 362 QImage *LoadScaleImage(QString filename, bool fromcache = true); 361 363 362 bool SendReceiveStringList(QStringList &strlist, bool quickTimeout = false); 364 bool SendReceiveStringList(QStringList &strlist, bool quickTimeout = false, 365 bool block = true); 363 366 364 367 QImage *CacheRemotePixmap(const QString &url, bool reCache = false); 365 368 -
libs/libmyth/mythcontext.cpp
2273 2273 ClearSettingsCache(key, newValue); 2274 2274 } 2275 2275 2276 bool MythContext::SendReceiveStringList(QStringList &strlist, bool quickTimeout )2276 bool MythContext::SendReceiveStringList(QStringList &strlist, bool quickTimeout, bool block) 2277 2277 { 2278 2278 d->serverSockLock.lock(); 2279 2279 2280 2280 if (!d->serverSock) 2281 { 2281 2282 ConnectToMasterServer(false); 2283 // should clear popup if it is currently active here. Not sure of the correct way. TBD 2284 } 2282 2285 2283 2286 bool ok = false; 2284 2287 … … 2312 2315 2313 2316 if (!ok) 2314 2317 { 2318 delete d->serverSock; 2319 d->serverSock = NULL; 2320 2315 2321 qApp->lock(); 2322 if (!block) 2323 d->serverSockLock.unlock(); 2316 2324 VERBOSE(VB_ALL, QString("Reconnection to backend server failed")); 2317 2325 MythPopupBox::showOkPopup(d->mainWindow, "connection failure", 2318 2326 tr("The connection to the master backend " 2319 2327 "server has gone away for some reason.. " 2320 2328 "Is it running?")); 2321 2329 2322 delete d->serverSock;2323 d->serverSock = NULL;2330 if (!block) 2331 d->serverSockLock.lock(); 2324 2332 qApp->unlock(); 2325 2333 } 2326 2334 }