src/protocols/silc/buddy.c

changeset 9133
bc33b12619d4
parent 9060
424f0d1f5020
child 9272
41e74d91931f
equal deleted inserted replaced
9132:48e107230849 9133:bc33b12619d4
309 } 309 }
310 310
311 static void 311 static void
312 silcgaim_buddy_keyagr(GaimBlistNode *node, gpointer data) 312 silcgaim_buddy_keyagr(GaimBlistNode *node, gpointer data)
313 { 313 {
314 GaimBuddy *buddy; 314 GaimBuddy *buddy;
315 315
316 buddy = (GaimBuddy *)node; 316 buddy = (GaimBuddy *)node;
317 silcgaim_buddy_keyagr_do(buddy->account->gc, buddy->name, FALSE); 317 silcgaim_buddy_keyagr_do(buddy->account->gc, buddy->name, FALSE);
318 } 318 }
319 319
795 memset(&serversign, 0, sizeof(serversign)); 795 memset(&serversign, 0, sizeof(serversign));
796 796
797 /* Now that we have the public key and we trust it now we 797 /* Now that we have the public key and we trust it now we
798 save the attributes of the buddy and update its status. */ 798 save the attributes of the buddy and update its status. */
799 799
800 silc_dlist_start(client_entry->attrs); 800 if (client_entry->attrs) {
801 while ((attr = silc_dlist_get(client_entry->attrs)) != SILC_LIST_END) { 801 silc_dlist_start(client_entry->attrs);
802 attribute = silc_attribute_get_attribute(attr); 802 while ((attr = silc_dlist_get(client_entry->attrs))
803 803 != SILC_LIST_END) {
804 switch (attribute) { 804 attribute = silc_attribute_get_attribute(attr);
805 805
806 case SILC_ATTRIBUTE_USER_INFO: 806 switch (attribute) {
807 if (!silc_attribute_get_object(attr, (void *)&vcard, 807 case SILC_ATTRIBUTE_USER_INFO:
808 sizeof(vcard))) 808 if (!silc_attribute_get_object(attr, (void *)&vcard,
809 continue; 809 sizeof(vcard)))
810 break; 810 continue;
811 811 break;
812 case SILC_ATTRIBUTE_STATUS_MESSAGE: 812
813 if (!silc_attribute_get_object(attr, (void *)&message, 813 case SILC_ATTRIBUTE_STATUS_MESSAGE:
814 sizeof(message))) 814 if (!silc_attribute_get_object(attr, (void *)&message,
815 continue; 815 sizeof(message)))
816 break; 816 continue;
817 817 break;
818 case SILC_ATTRIBUTE_EXTENSION: 818
819 if (!silc_attribute_get_object(attr, (void *)&extension, 819 case SILC_ATTRIBUTE_EXTENSION:
820 sizeof(extension))) 820 if (!silc_attribute_get_object(attr, (void *)&extension,
821 continue; 821 sizeof(extension)))
822 break; 822 continue;
823 823 break;
824 case SILC_ATTRIBUTE_SERVER_PUBLIC_KEY: 824
825 if (serverpk.type) 825 case SILC_ATTRIBUTE_SERVER_PUBLIC_KEY:
826 continue; 826 if (serverpk.type)
827 if (!silc_attribute_get_object(attr, (void *)&serverpk, 827 continue;
828 sizeof(serverpk))) 828 if (!silc_attribute_get_object(attr, (void *)&serverpk,
829 continue; 829 sizeof(serverpk)))
830 break; 830 continue;
831 831 break;
832 case SILC_ATTRIBUTE_USER_DIGITAL_SIGNATURE: 832
833 if (usersign.data) 833 case SILC_ATTRIBUTE_USER_DIGITAL_SIGNATURE:
834 continue; 834 if (usersign.data)
835 if (!silc_attribute_get_object(attr, (void *)&usersign, 835 continue;
836 sizeof(usersign))) 836 if (!silc_attribute_get_object(attr, (void *)&usersign,
837 continue; 837 sizeof(usersign)))
838 break; 838 continue;
839 839 break;
840 case SILC_ATTRIBUTE_SERVER_DIGITAL_SIGNATURE: 840
841 if (serversign.data) 841 case SILC_ATTRIBUTE_SERVER_DIGITAL_SIGNATURE:
842 continue; 842 if (serversign.data)
843 if (!silc_attribute_get_object(attr, (void *)&serversign, 843 continue;
844 sizeof(serversign))) 844 if (!silc_attribute_get_object(attr, (void *)&serversign,
845 continue; 845 sizeof(serversign)))
846 break; 846 continue;
847 847 break;
848 default: 848
849 break; 849 default:
850 break;
851 }
850 } 852 }
851 } 853 }
852 854
853 /* Verify the attribute signatures */ 855 /* Verify the attribute signatures */
854 856

mercurial