| 539 |
539 |
| 540 qd = (qq_data *) gc->proto_data; |
540 qd = (qq_data *) gc->proto_data; |
| 541 len = buf_len; |
541 len = buf_len; |
| 542 data = g_newa(guint8, len); |
542 data = g_newa(guint8, len); |
| 543 |
543 |
| 544 if (qq_crypt(DECRYPT, buf, buf_len, qd->session_key, data, &len)) { |
544 if (qq_decrypt(buf, buf_len, qd->session_key, data, &len)) { |
| 545 data[len] = '\0'; |
545 data[len] = '\0'; |
| 546 if (qd->uid == atoi((gchar *) data)) { /* return should be my uid */ |
546 if (qd->uid == atoi((gchar *) data)) { /* return should be my uid */ |
| 547 purple_debug(PURPLE_DEBUG_INFO, "QQ", "Update info ACK OK\n"); |
547 purple_debug(PURPLE_DEBUG_INFO, "QQ", "Update info ACK OK\n"); |
| 548 purple_notify_info(gc, NULL, _("Your information has been updated"), NULL); |
548 purple_notify_info(gc, NULL, _("Your information has been updated"), NULL); |
| 549 } |
549 } |
| 716 list = query_list = NULL; |
716 list = query_list = NULL; |
| 717 len = buf_len; |
717 len = buf_len; |
| 718 data = g_newa(guint8, len); |
718 data = g_newa(guint8, len); |
| 719 info = NULL; |
719 info = NULL; |
| 720 |
720 |
| 721 if (qq_crypt(DECRYPT, buf, buf_len, qd->session_key, data, &len)) { |
721 if (qq_decrypt(buf, buf_len, qd->session_key, data, &len)) { |
| 722 if (NULL == (segments = split_data(data, len, "\x1e", QQ_CONTACT_FIELDS))) |
722 if (NULL == (segments = split_data(data, len, "\x1e", QQ_CONTACT_FIELDS))) |
| 723 return; |
723 return; |
| 724 |
724 |
| 725 info = (contact_info *) segments; |
725 info = (contact_info *) segments; |
| 726 if (qd->modifying_face && strtol(info->face, NULL, 10) != qd->my_icon) { |
726 if (qd->modifying_face && strtol(info->face, NULL, 10) != qd->my_icon) { |
| 826 PurpleAccount *account = purple_connection_get_account(gc); |
826 PurpleAccount *account = purple_connection_get_account(gc); |
| 827 qq_data *qd = (qq_data *) gc->proto_data; |
827 qq_data *qd = (qq_data *) gc->proto_data; |
| 828 |
828 |
| 829 decr_len = buf_len; |
829 decr_len = buf_len; |
| 830 decr_buf = g_new0(guint8, buf_len); |
830 decr_buf = g_new0(guint8, buf_len); |
| 831 if (!qq_crypt(DECRYPT, buf, buf_len, qd->session_key, decr_buf, &decr_len)) { |
831 if (!qq_decrypt(buf, buf_len, qd->session_key, decr_buf, &decr_len)) { |
| 832 purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Couldn't decrypt get level packet\n"); |
832 purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Couldn't decrypt get level packet\n"); |
| 833 } |
833 } |
| 834 |
834 |
| 835 decr_len--; |
835 decr_len--; |
| 836 if (decr_len % 12 != 0) { |
836 if (decr_len % 12 != 0) { |