| 252 } |
252 } |
| 253 } |
253 } |
| 254 |
254 |
| 255 /** |
255 /** |
| 256 * \internal Analizuje informacje rozszerzone wiadomości. |
256 * \internal Analizuje informacje rozszerzone wiadomości. |
| 257 * |
257 * |
| 258 * \param sess Struktura sesji. |
258 * \param sess Struktura sesji. |
| 259 * \param e Struktura zdarzenia. |
259 * \param e Struktura zdarzenia. |
| 260 * \param sender Numer nadawcy. |
260 * \param sender Numer nadawcy. |
| 261 * \param p Wskaźnik na dane rozszerzone. |
261 * \param p Wskaźnik na dane rozszerzone. |
| 262 * \param packet_end Wskaźnik na koniec pakietu. |
262 * \param packet_end Wskaźnik na koniec pakietu. |
| 1024 |
1024 |
| 1025 memcpy(e->event.notify60[i].descr, (char*) n + sizeof(struct gg_notify_reply60) + 1, descr_len); |
1025 memcpy(e->event.notify60[i].descr, (char*) n + sizeof(struct gg_notify_reply60) + 1, descr_len); |
| 1026 e->event.notify60[i].descr[descr_len] = 0; |
1026 e->event.notify60[i].descr[descr_len] = 0; |
| 1027 |
1027 |
| 1028 /* XXX czas */ |
1028 /* XXX czas */ |
| 1029 |
1029 |
| 1030 length -= sizeof(struct gg_notify_reply60) + descr_len + 1; |
1030 length -= sizeof(struct gg_notify_reply60) + descr_len + 1; |
| 1031 n = (void*) ((char*) n + sizeof(struct gg_notify_reply60) + descr_len + 1); |
1031 n = (void*) ((char*) n + sizeof(struct gg_notify_reply60) + descr_len + 1); |
| 1032 } else { |
1032 } else { |
| 1033 length = 0; |
1033 length = 0; |
| 1034 } |
1034 } |
| 2075 if (sess->protocol_version >= 0x2e) { |
2075 if (sess->protocol_version >= 0x2e) { |
| 2076 struct gg_login80 l; |
2076 struct gg_login80 l; |
| 2077 |
2077 |
| 2078 uint32_t tmp_version_len = gg_fix32(strlen(GG8_VERSION)); |
2078 uint32_t tmp_version_len = gg_fix32(strlen(GG8_VERSION)); |
| 2079 uint32_t tmp_descr_len = gg_fix32((sess->initial_descr) ? strlen(sess->initial_descr) : 0); |
2079 uint32_t tmp_descr_len = gg_fix32((sess->initial_descr) ? strlen(sess->initial_descr) : 0); |
| 2080 |
2080 |
| 2081 memset(&l, 0, sizeof(l)); |
2081 memset(&l, 0, sizeof(l)); |
| 2082 l.uin = gg_fix32(sess->uin); |
2082 l.uin = gg_fix32(sess->uin); |
| 2083 memcpy(l.language, GG8_LANG, sizeof(l.language)); |
2083 memcpy(l.language, GG8_LANG, sizeof(l.language)); |
| 2084 l.hash_type = sess->hash_type; |
2084 l.hash_type = sess->hash_type; |
| 2085 memcpy(l.hash, login_hash, sizeof(login_hash)); |
2085 memcpy(l.hash, login_hash, sizeof(login_hash)); |
| 2088 l.features = gg_fix32(sess->protocol_features); |
2088 l.features = gg_fix32(sess->protocol_features); |
| 2089 l.image_size = sess->image_size; |
2089 l.image_size = sess->image_size; |
| 2090 l.dunno2 = 0x64; |
2090 l.dunno2 = 0x64; |
| 2091 |
2091 |
| 2092 gg_debug_session(sess, GG_DEBUG_TRAFFIC, "// gg_watch_fd() sending GG_LOGIN80 packet\n"); |
2092 gg_debug_session(sess, GG_DEBUG_TRAFFIC, "// gg_watch_fd() sending GG_LOGIN80 packet\n"); |
| 2093 ret = gg_send_packet(sess, GG_LOGIN80, |
2093 ret = gg_send_packet(sess, GG_LOGIN80, |
| 2094 &l, sizeof(l), |
2094 &l, sizeof(l), |
| 2095 &tmp_version_len, sizeof(uint32_t), GG8_VERSION, strlen(GG8_VERSION), |
2095 &tmp_version_len, sizeof(uint32_t), GG8_VERSION, strlen(GG8_VERSION), |
| 2096 &tmp_descr_len, sizeof(uint32_t), sess->initial_descr, (sess->initial_descr) ? strlen(sess->initial_descr) : 0, |
2096 &tmp_descr_len, sizeof(uint32_t), sess->initial_descr, (sess->initial_descr) ? strlen(sess->initial_descr) : 0, |
| 2097 NULL); |
2097 NULL); |
| 2098 |
2098 |
| 2099 } else if (sess->protocol_version == 0x2d) { |
2099 } else if (sess->protocol_version == 0x2d) { |