Async connect/disconnect. Moved everything to a new Async and Timeout which cleans...
[theonering] / src / theonering.py
index 23ad1ee..1e06a1d 100755 (executable)
@@ -34,7 +34,7 @@ import constants
 import connection_manager
 
 
-IDLE_TIMEOUT = 5000
+IDLE_TIMEOUT = 5
 
 
 def run_theonering(persist):
@@ -60,10 +60,10 @@ def run_theonering(persist):
        if persist:
                shutdown_callback = None
        else:
-               gobject.timeout_add(IDLE_TIMEOUT, timeout_cb)
+               gobject_utils.timeout_add_seconds(IDLE_TIMEOUT, timeout_cb)
                shutdown_callback = quit
 
-       signal.signal(signal.SIGTERM, quit)
+       signal.signal(signal.SIGTERM, lambda: quit)
 
        try:
                manager = connection_manager.TheOneRingConnectionManager(shutdown_func=shutdown_callback)
@@ -101,7 +101,7 @@ def main(logToFile):
                        format='(%(asctime)s) %(levelname)s:%(name)s:%(message)s',
                        datefmt='%H:%M:%S',
                )
-       logging.debug("telepathy-theonering %s-%s" % (constants.__version__, constants.__build__))
+       logging.info("telepathy-theonering %s-%s" % (constants.__version__, constants.__build__))
        logging.debug("OS: %s" % (os.uname()[0], ))
        logging.debug("Kernel: %s (%s) for %s" % os.uname()[2:])
        logging.debug("Hostname: %s" % os.uname()[1])