comparison libpurple/protocols/myspace/myspace.c @ 17664:8ee3fd09a543

Remove lots of debugging statements, no longer needed. Along with 172d2f1fc811dba4cf65d127b27a799d1e121b58, this patch (I believe) fixes #193. The problem was that msim_close() was being called twice. Removed spurious calls, and no longer appears to crash. This now works: * Login with an invalid password. * `Protocol error, code 260: The password provided is incorrect.` (good) * Disable, and re-enable account. * Receive the same error message (good, no crash). * Repeat previous two steps ''ad nauseum'', with no crash. Closes #193.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Mon, 25 Jun 2007 05:24:44 +0000
parents 814992cefc9c
children 5c2720824798
comparison
equal deleted inserted replaced
17663:814992cefc9c 17664:8ee3fd09a543
2169 * @param session The session to destroy. 2169 * @param session The session to destroy.
2170 */ 2170 */
2171 void 2171 void
2172 msim_session_destroy(MsimSession *session) 2172 msim_session_destroy(MsimSession *session)
2173 { 2173 {
2174 purple_debug_info("msim", ">>> going to check if valid\n");
2175
2176 g_return_if_fail(MSIM_SESSION_VALID(session)); 2174 g_return_if_fail(MSIM_SESSION_VALID(session));
2177 2175
2178 purple_debug_info("msim", ">>> going to set magic\n");
2179
2180 session->magic = -1; 2176 session->magic = -1;
2181 2177
2182 purple_debug_info("msim", ">>> going to free rxbuf\n");
2183 g_free(session->rxbuf); 2178 g_free(session->rxbuf);
2184 2179
2185 /* TODO: Remove. */ 2180 /* TODO: Remove. */
2186 purple_debug_info("msim", ">>> going to free user_lookup_cb\n");
2187 g_hash_table_destroy(session->user_lookup_cb); 2181 g_hash_table_destroy(session->user_lookup_cb);
2188 purple_debug_info("msim", ">>> going to free user_lookup_cb_data\n");
2189 g_hash_table_destroy(session->user_lookup_cb_data); 2182 g_hash_table_destroy(session->user_lookup_cb_data);
2190 2183
2191 purple_debug_info("msim", ">>> going to free session itself\n");
2192 g_free(session); 2184 g_free(session);
2193 } 2185 }
2194 2186
2195 /** 2187 /**
2196 * Close the connection. 2188 * Close the connection.
2200 void 2192 void
2201 msim_close(PurpleConnection *gc) 2193 msim_close(PurpleConnection *gc)
2202 { 2194 {
2203 MsimSession *session; 2195 MsimSession *session;
2204 2196
2205 purple_debug_info("msim", "msim_close: closing, gc=0x%x\n", gc);
2206
2207 if (gc == NULL) 2197 if (gc == NULL)
2208 return; 2198 return;
2209 2199
2210 purple_debug_info("msim", "msim_close: dereferencing gc->proto_data\n");
2211 session = (MsimSession *)gc->proto_data; 2200 session = (MsimSession *)gc->proto_data;
2212 if (session == NULL) 2201 if (session == NULL)
2213 return; 2202 return;
2214 2203
2215 gc->proto_data = NULL; 2204 gc->proto_data = NULL;
2216 2205
2217 purple_debug_info("msim", "msim_close: checking if session is valid\n");
2218 if (!MSIM_SESSION_VALID(session)) 2206 if (!MSIM_SESSION_VALID(session))
2219 return; 2207 return;
2220 2208
2221 purple_debug_info("msim", "msim_close: about to remove inpa\n");
2222 if (session->gc->inpa) 2209 if (session->gc->inpa)
2223 purple_input_remove(session->gc->inpa); 2210 purple_input_remove(session->gc->inpa);
2224 2211
2225 purple_debug_info("msim", "msim_close: ready to destroy session\n");
2226 msim_session_destroy(session); 2212 msim_session_destroy(session);
2227 } 2213 }
2228 2214
2229 2215
2230 /** 2216 /**