diff options
| author | Pekka Pessi <Pekka.Pessi@nokia.com> | 2008-11-05 11:14:33 +0200 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-12-08 16:10:58 +0200 | 
| commit | a9906a602583ae945fdc0f2f91c4bd2e184f62f0 (patch) | |
| tree | 725eb4687001696e53ac6813f1744cd242ec2e57 | |
| parent | 30c8ffbc0a7cb3380821cb1e290a32d90a63ad7e (diff) | |
Subscribe signals before requesting instance status
| -rw-r--r-- | audio/telephony-maemo.c | 28 | 
1 files changed, 12 insertions, 16 deletions
diff --git a/audio/telephony-maemo.c b/audio/telephony-maemo.c index 713a618d..20ce8825 100644 --- a/audio/telephony-maemo.c +++ b/audio/telephony-maemo.c @@ -1417,6 +1417,18 @@ int telephony_init(void)  		return -EIO;  	} +	snprintf(match_string, sizeof(match_string), +			"type=signal,interface=%s", CSD_CALL_INTERFACE); +	dbus_bus_add_match(connection, match_string, NULL); + +	snprintf(match_string, sizeof(match_string), +			"type=signal,interface=%s", CSD_CALL_INSTANCE); +	dbus_bus_add_match(connection, match_string, NULL); + +	snprintf(match_string, sizeof(match_string), +			"type=signal,interface=%s", NETWORK_INTERFACE); +	dbus_bus_add_match(connection, match_string, NULL); +  	msg = dbus_message_new_method_call(CSD_CALL_BUS_NAME, CSD_CALL_PATH,  						CSD_CALL_INTERFACE,  						"GetCallInfoAll"); @@ -1435,22 +1447,6 @@ int telephony_init(void)  	dbus_pending_call_unref(call);  	dbus_message_unref(msg); -	snprintf(match_string, sizeof(match_string), -			"type=signal,interface=%s", CSD_CALL_INTERFACE); -	dbus_bus_add_match(connection, match_string, NULL); - -	snprintf(match_string, sizeof(match_string), -			"type=signal,interface=%s", CSD_CALL_INSTANCE); -	dbus_bus_add_match(connection, match_string, NULL); - -	snprintf(match_string, sizeof(match_string), -			"type=signal,interface=%s", CSD_CALL_INSTANCE); -	dbus_bus_add_match(connection, match_string, NULL); - -	snprintf(match_string, sizeof(match_string), -			"type=signal,interface=%s", NETWORK_INTERFACE); -	dbus_bus_add_match(connection, match_string, NULL); -  	return 0;  }  | 
