summaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/client.c b/src/client.c
index dbbdd5f..2ac04bf 100644
--- a/src/client.c
+++ b/src/client.c
@@ -452,10 +452,7 @@ static int send_listener_list(struct mux_client *client, uint32_t tag)
452 plist_dict_set_item(l, "Blacklisted", plist_new_bool(0)); 452 plist_dict_set_item(l, "Blacklisted", plist_new_bool(0));
453 n = NULL; 453 n = NULL;
454 if (lc->info) { 454 if (lc->info) {
455 n = plist_dict_get_item(lc->info, "BundleID"); 455 plist_dict_copy_item(l, lc->info, "BundleID", NULL);
456 }
457 if (n) {
458 plist_dict_set_item(l, "BundleID", plist_copy(n));
459 } 456 }
460 plist_dict_set_item(l, "ConnType", plist_new_uint(0)); 457 plist_dict_set_item(l, "ConnType", plist_new_uint(0));
461 458
@@ -632,28 +629,11 @@ static char* plist_dict_get_string_val(plist_t dict, const char* key)
632 629
633static void update_client_info(struct mux_client *client, plist_t dict) 630static void update_client_info(struct mux_client *client, plist_t dict)
634{ 631{
635 plist_t node = NULL;
636 plist_t info = plist_new_dict(); 632 plist_t info = plist_new_dict();
637 633 plist_dict_copy_item(info, dict, "BundleID", NULL);
638 node = plist_dict_get_item(dict, "BundleID"); 634 plist_dict_copy_item(info, dict, "ClientVersionString", NULL);
639 if (node && (plist_get_node_type(node) == PLIST_STRING)) { 635 plist_dict_copy_item(info, dict, "ProgName", NULL);
640 plist_dict_set_item(info, "BundleID", plist_copy(node)); 636 plist_dict_copy_item(info, dict, "kLibUSBMuxVersion", NULL);
641 }
642
643 node = plist_dict_get_item(dict, "ClientVersionString");
644 if (node && (plist_get_node_type(node) == PLIST_STRING)) {
645 plist_dict_set_item(info, "ClientVersionString", plist_copy(node));
646 }
647
648 node = plist_dict_get_item(dict, "ProgName");
649 if (node && (plist_get_node_type(node) == PLIST_STRING)) {
650 plist_dict_set_item(info, "ProgName", plist_copy(node));
651 }
652
653 node = plist_dict_get_item(dict, "kLibUSBMuxVersion");
654 if (node && (plist_get_node_type(node) == PLIST_UINT)) {
655 plist_dict_set_item(info, "kLibUSBMuxVersion", plist_copy(node));
656 }
657 plist_free(client->info); 637 plist_free(client->info);
658 client->info = info; 638 client->info = info;
659} 639}