Skip to contentSkip to conversation

callforwarding: fix missing prefixes in PropertyChanged property names

PATCH New Andres Salomon 1 participant 1 message Apr 25

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 callforwarding: fix missing prefixes in PropertyChanged property names

A qofono test I was running hit a failure due to unexpected responses:

task-0: method call time=1777146276.985742 sender=:1.6 -> destination=org.ofono serial=23 path=/phonesim; interface=org.ofono.CallForwarding; member=SetProperty
task-0:    string "VoiceUnconditional"
task-0:    variant       string "12345678"
task-0: method return time=1777146276.991119 sender=:1.1 -> destination=:1.6 serial=159 reply_serial=23
task-0: signal time=1777146276.991146 sender=:1.1 -> destination=(null destination) serial=160 path=/phonesim; interface=org.ofono.CallForwarding; member=PropertyChanged
task-0:    string "VoiceUnconditional"
task-0:    variant       string "12345678"
task-0: signal time=1777146276.991165 sender=:1.1 -> destination=(null destination) serial=161 path=/phonesim; interface=org.ofono.CallForwarding; member=PropertyChanged
task-0:    string "Busy"
task-0:    variant       string ""
task-0: signal time=1777146276.991181 sender=:1.1 -> destination=(null destination) serial=162 path=/phonesim; interface=org.ofono.CallForwarding; member=PropertyChanged
task-0:    string "NoReply"
task-0:    variant       string ""
task-0: signal time=1777146276.991196 sender=:1.1 -> destination=(null destination) serial=163 path=/phonesim; interface=org.ofono.CallForwarding; member=PropertyChanged
task-0:    string "NotReachable"
task-0:    variant       string ""
task-0: signal time=1777146276.991212 sender=:1.1 -> destination=(null destination) serial=164 path=/phonesim; interface=org.ofono.CallForwarding; member=PropertyChanged
task-0:    string "ForwardingFlagOnSim"
task-0:    variant       boolean true

Other places in the code and call-forwarding-api.txt document that those property names should have a class prefix like "VoiceNoReply", instead of just "NoReply". This fixes the lack of prefix.

---
 src/call-forwarding.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
src/call-forwarding.c +5 -1
index 9aca1f03..12bc463f 100644
@@ -395,9 +395,13 @@ static void set_new_cond_list(struct ofono_call_forwarding *cf,
 				number = phone_number_to_string(
 							&lc->phone_number);
 
+			snprintf(attr, sizeof(attr), "%s%s",
+				bearer_class_to_string(BEARER_CLASS_VOICE),
+				cf_type_lut[i]);
+
 			ofono_dbus_signal_property_changed(conn, path,
 						OFONO_CALL_FORWARDING_INTERFACE,
-						cf_type_lut[i],
+						attr,
 						DBUS_TYPE_STRING, &number);
 		}
 
Signature · 1 line
2.53.0