| 109 next_field (ptr); |
111 next_field (ptr); |
| 110 |
112 |
| 111 /*XXX 3 */ |
113 /*XXX 3 */ |
| 112 numfields -= 2; /* numfields, version, and checksum */ |
114 numfields -= 2; /* numfields, version, and checksum */ |
| 113 if (numfields < 0) { |
115 if (numfields < 0) { |
| |
116 GInetAddress *inet_addr = NULL; |
| |
117 gchar *inet_addr_str = NULL; |
| 114 badpkt: |
118 badpkt: |
| 115 #if 0 |
119 inet_addr = g_inet_address_new_from_bytes( |
| |
120 (const guint8 *)¬ice->z_uid.zuid_addr, |
| |
121 G_SOCKET_FAMILY_IPV4); |
| |
122 inet_addr_str = g_inet_address_to_string(inet_addr); |
| 116 #ifdef __LINE__ |
123 #ifdef __LINE__ |
| 117 lineno = __LINE__; |
124 lineno = __LINE__; |
| 118 purple_debug_error("zephyr", "ZParseNotice: bad packet from %s/%d (line %d)", inet_ntoa (notice->z_uid.zuid_addr.s_addr), notice->z_port, lineno); |
125 purple_debug_error("zephyr", "ZParseNotice: bad packet from %s/%d (line %d)", |
| |
126 inet_addr_str, notice->z_port, lineno); |
| 119 #else |
127 #else |
| 120 purple_debug_error("zephyr", "ZParseNotice: bad packet from %s/%d", inet_ntoa (notice->z_uid.zuid_addr.s_addr), notice->z_port); |
128 purple_debug_error("zephyr", "ZParseNotice: bad packet from %s/%d", |
| 121 #endif |
129 inet_addr_str, notice->z_port); |
| 122 #endif |
130 #endif |
| |
131 g_free(inet_addr_str); |
| |
132 g_object_unref(inet_addr); |
| 123 return ZERR_BADPKT; |
133 return ZERR_BADPKT; |
| 124 } |
134 } |
| 125 |
135 |
| 126 if (numfields) { |
136 if (numfields) { |
| 127 if (ZReadAscii32(ptr, end-ptr, &temp) == ZERR_BADFIELD) |
137 if (ZReadAscii32(ptr, end-ptr, &temp) == ZERR_BADFIELD) |