comparison libpurple/protocols/sametime/sametime.c @ 23786:e4a4bc86c547

propagate from branch 'im.pidgin.pidgin' (head 119df2055ed7ee5143047b4d18ae81d58c2feac6) to branch 'im.pidgin.pidgin.vv' (head 06ea1dd8fde62c8644d3a64b8f8e8a16d6a14dc9)
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 18 Mar 2008 05:40:29 +0000
parents f5bcb58bdf56 3225c99785b8
children 92e71f6e10d4
comparison
equal deleted inserted replaced
23785:efaecb71baad 23786:e4a4bc86c547
376 376
377 377
378 static int mw_session_io_write(struct mwSession *session, 378 static int mw_session_io_write(struct mwSession *session,
379 const guchar *buf, gsize len) { 379 const guchar *buf, gsize len) {
380 struct mwPurplePluginData *pd; 380 struct mwPurplePluginData *pd;
381 int ret = 0; 381 ssize_t ret = 0;
382 int err = 0; 382 int err = 0;
383 383
384 pd = mwSession_getClientData(session); 384 pd = mwSession_getClientData(session);
385 385
386 /* socket was already closed. */ 386 /* socket was already closed. */
411 DEBUG_INFO("EAGAIN\n"); 411 DEBUG_INFO("EAGAIN\n");
412 purple_circ_buffer_append(pd->sock_buf, buf, len); 412 purple_circ_buffer_append(pd->sock_buf, buf, len);
413 pd->outpa = purple_input_add(pd->socket, PURPLE_INPUT_WRITE, write_cb, pd); 413 pd->outpa = purple_input_add(pd->socket, PURPLE_INPUT_WRITE, write_cb, pd);
414 414
415 } else if(len > 0) { 415 } else if(len > 0) {
416 DEBUG_ERROR("write returned %i, %i bytes left unwritten\n", ret, len); 416 DEBUG_ERROR("write returned %" G_GSIZE_FORMAT ", %" G_GSIZE_FORMAT
417 " bytes left unwritten\n", ret, len);
417 purple_connection_error_reason(pd->gc, 418 purple_connection_error_reason(pd->gc,
418 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, 419 PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
419 _("Connection closed (writing)")); 420 _("Connection closed (writing)"));
420 421
421 #if 0 422 #if 0