Mercurial > pidgin.yaz
changeset 20492:f062793410b5
Reset unsigned ints to 0 instead of to -1.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 08 Sep 2007 01:28:00 +0000 |
parents | e43f419e6d28 |
children | 9e2ed6cd824b |
files | libpurple/protocols/msn/soap.c |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/soap.c Sat Sep 08 01:05:41 2007 +0000 +++ b/libpurple/protocols/msn/soap.c Sat Sep 08 01:28:00 2007 +0000 @@ -50,8 +50,8 @@ soapconn->ssl_conn = sslconn; soapconn->gsc = NULL; - soapconn->input_handler = -1; - soapconn->output_handler = -1; + soapconn->input_handler = 0; + soapconn->output_handler = 0; msn_soap_set_process_step(soapconn,MSN_SOAP_UNCONNECTED); soapconn->soap_queue = g_queue_new(); @@ -168,11 +168,12 @@ /*remove the write handler*/ if (soapconn->output_handler > 0){ purple_input_remove(soapconn->output_handler); + soapconn->output_handler = 0; } /*remove the read handler*/ if (soapconn->input_handler > 0){ purple_input_remove(soapconn->input_handler); - soapconn->input_handler = -1; + soapconn->input_handler = 0; } msn_soap_free_read_buf(soapconn); msn_soap_free_write_buf(soapconn); @@ -231,7 +232,7 @@ "read len: %d, error = %s\n", len, strerror(errno)); purple_input_remove(soapconn->input_handler); - soapconn->input_handler = -1; + soapconn->input_handler = 0; g_free(soapconn->read_buf); soapconn->read_buf = NULL; soapconn->read_len = 0; @@ -464,7 +465,7 @@ /*remove the read handler*/ purple_input_remove(soapconn->input_handler); - soapconn->input_handler = -1; + soapconn->input_handler = 0; /* * close the soap connection,if more soap request came, * Just reconnect to do it, @@ -568,7 +569,7 @@ soapconn->written_cb(soapconn, source, 0); } /*maybe we need to read the input?*/ - if ( soapconn->input_handler == -1 ) { + if (soapconn->input_handler == 0) { soapconn->input_handler = purple_input_add(soapconn->gsc->fd, PURPLE_INPUT_READ, msn_soap_read_cb, soapconn); }