branch: master commit 2ebc214ecbc3a0fef006b4ef1c0f3f8e1eafd29c Author: Ian D <du...@gnu.org> Commit: Ian D <du...@gnu.org>
Changed timeout on enwc-wicd-get-wireless-network-property. --- lisp/enwc-wicd.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/enwc-wicd.el b/lisp/enwc-wicd.el old mode 100755 new mode 100644 index e7388d2..0343648 --- a/lisp/enwc-wicd.el +++ b/lisp/enwc-wicd.el @@ -98,6 +98,7 @@ the wicd wired interface." (defvar enwc-wicd-prop-values nil) (defvar enwc-wicd-prop-num 0) +(defvar enwc-wicd-prop-timeout 3) (defun enwc-wicd-nw-prop-handler (&rest args) (setq enwc-wicd-prop-values (cons args enwc-wicd-prop-values)) @@ -113,11 +114,9 @@ from wireless network with id ID." enwc-wicd-dbus-wireless-interface "GetWirelessProperty" 'enwc-wicd-nw-prop-handler + :timeout 1000 :int32 id - :string prop) - - ;;(enwc-wicd-dbus-wireless-call-method "GetWirelessProperty" id prop) - ) + :string prop)) (defun enwc-wicd-build-prop-list (prop-list det-list) (let (ret @@ -136,8 +135,11 @@ from wireless network with id ID." (enwc-wicd-get-wireless-network-property id x)) enwc-wicd-details-list) ;; Wait for less than a second. + (with-timeout (enwc-wicd-prop-timeout) + (while (< enwc-wicd-prop-num 6) + (read-event nil nil 0.001))) (while (< enwc-wicd-prop-num 6) - (read-event nil nil 0.001)) + (enwc-wicd-nw-prop-handler nil)) (enwc-wicd-build-prop-list enwc-wicd-prop-values enwc-wicd-details-list)) (defun enwc-wicd-get-encryption-type (id)