@@ -637,22 +637,19 @@ int SDL_DBus_StartLocation(void)
637
637
goto failure ;
638
638
}
639
639
640
- /* Dictionnary with session_handle_token */
641
640
dbus .message_iter_init_append (msg , & iterInit );
642
- if (!SDL_DBus_AppendDictWithKeyValue (& iterInit , "session_handle_token" , session_handle_token )) {
643
- goto failure ;
644
- }
645
- #if 0
646
- /* optional */
647
- if (!SDL_DBus_AppendDictWithKeyValue (& iterInit , "distance-threshold" , "0" )) {
648
- goto failure ;
649
- }
650
641
651
- /* optional */
652
- if (!SDL_DBus_AppendDictWithKeyValue (& iterInit , "time-threshold" , "0" )) {
653
- goto failure ;
642
+ /* a{sv} */
643
+ {
644
+ const char * keys [1 ];
645
+ const char * values [1 ];
646
+ keys [0 ] = "session_handle_token" ;
647
+ values [0 ] = session_handle_token ;
648
+ if (!SDL_DBus_AppendDictWithKeysValues (& iterInit , keys , values , 1 )) {
649
+ goto failure ;
650
+ }
654
651
}
655
- #endif
652
+
656
653
if (SDL_DBus_CallWithBasicReply (dbus .session_conn , msg , DBUS_TYPE_OBJECT_PATH , & session_path )) {
657
654
session_path = SDL_strdup (session_path );
658
655
} else {
@@ -699,10 +696,17 @@ int SDL_DBus_StartLocation(void)
699
696
goto failure ;
700
697
}
701
698
702
- /* Dictionnary with handle_token */
703
699
dbus .message_iter_init_append (msg , & iterInit );
704
- if (!SDL_DBus_AppendDictWithKeyValue (& iterInit , "handle_token" , handle_token )) {
705
- goto failure ;
700
+
701
+ /* a{sv} */
702
+ {
703
+ const char * keys [1 ];
704
+ const char * values [1 ];
705
+ keys [0 ] = "handle_token" ;
706
+ values [0 ] = handle_token ;
707
+ if (!SDL_DBus_AppendDictWithKeysValues (& iterInit , keys , values , 1 )) {
708
+ goto failure ;
709
+ }
706
710
}
707
711
708
712
if (SDL_DBus_CallWithBasicReply (dbus .session_conn , msg , DBUS_TYPE_OBJECT_PATH , & request_path )) {
0 commit comments