php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66504 Add getTimeout/setTimeout methods to Dbus class
Submitted: 2014-01-17 07:25 UTC Modified: 2017-10-24 08:08 UTC
Votes:12
Avg. Score:3.8 ± 1.7
Reproduced:8 of 10 (80.0%)
Same Version:8 (100.0%)
Same OS:6 (75.0%)
From: pavlonion at gmail dot com Assigned:
Status: Open Package: DBus (PECL)
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pavlonion at gmail dot com
New email:
PHP Version: OS:

 

 [2014-01-17 07:25 UTC] pavlonion at gmail dot com
Description:
------------
By default D-Bus method call is limited by 25 seconds.
I believe, that it would be useful to have an ability to set and get timeout parameter for D-Bus calls.

Test script:
---------------
$dbus = new Dbus(Dbus::BUS_SYSTEM);

// If this method would exist
if (method_exists($dbus, 'setTimeout')) {
   // This is the way to set infinite timeout.
   $dbus->setTimeout(Dbus::TIMEOUT_INFINITE);
}

$proxy = $dbus->createProxy('net.php.bugs.service', '/obj', 'iface');

$timeout = $dbus->getTimeout();
echo 'Max call time is '
   .($timeout == Dbus::TIMEOUT_INFINITE? 'infinite': "$timeout seconds");

$proxy->someLongMethod();


Expected result:
----------------
Max call time is infinite

Actual result:
--------------
As a result PHP-developers, who use Dbus, will be able to set required time for Dbus methods call. That is specially useful, when one deals with long net or database interactions.

Patches

dbus-timeout.diff (last revision 2014-01-17 07:29 UTC by pavlonion at gmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-17 07:40 UTC] pavlonion at gmail dot com
Sorry, I misunderstood "Actual result" division...

Actual result:
--------------
Max call time is 25 seconds
 [2014-01-18 08:01 UTC] krakjoe@php.net
-Assigned To: +Assigned To: derick
 [2014-01-18 08:01 UTC] krakjoe@php.net
Assigning to derick, because he's a busy guy and probably hasn't seen this yet :)
 [2017-10-24 08:08 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: derick +Assigned To:
 [2023-03-01 10:01 UTC] croverwnorene8 at googlemail dot com
thanks for this....  https://www.homebargainsportal.com/github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 10:01:28 2024 UTC