Mercurial > pidgin
comparison src/protocols/yahoo/ycht.c @ 9397:3b0c6255033e
[gaim-migrate @ 10209]
Add back some strings. We still don't actually use this code. It's used
with web messenger, which i'll make us fall back on soon.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Fri, 25 Jun 2004 05:41:50 +0000 |
parents | 3aa848ccf986 |
children | 8b2451878e26 |
comparison
equal
deleted
inserted
replaced
9396:84594a281500 | 9397:3b0c6255033e |
---|---|
398 g_free(ycht); | 398 g_free(ycht); |
399 } | 399 } |
400 | 400 |
401 static void ycht_connection_error(YchtConn *ycht, const gchar *error) | 401 static void ycht_connection_error(YchtConn *ycht, const gchar *error) |
402 { | 402 { |
403 #if 0 | 403 |
404 /* string freeze */ | |
405 gaim_notify_info(ycht->gc, NULL, _("Connection problem with the YCHT server."), error); | 404 gaim_notify_info(ycht->gc, NULL, _("Connection problem with the YCHT server."), error); |
406 #endif | |
407 ycht_connection_close(ycht); | 405 ycht_connection_close(ycht); |
408 } | 406 } |
409 | 407 |
410 static void ycht_pending(gpointer data, gint source, GaimInputCondition cond) | 408 static void ycht_pending(gpointer data, gint source, GaimInputCondition cond) |
411 { | 409 { |
414 int len; | 412 int len; |
415 | 413 |
416 len = read(ycht->fd, buf, sizeof(buf)); | 414 len = read(ycht->fd, buf, sizeof(buf)); |
417 | 415 |
418 if (len <= 0) { | 416 if (len <= 0) { |
419 /*ycht_connection_error(ycht, _("Unable to read"));*/ | 417 ycht_connection_error(ycht, _("Unable to read")); |
420 ycht_connection_error(ycht, NULL); | |
421 return; | 418 return; |
422 } | 419 } |
423 | 420 |
424 ycht->rxqueue = g_realloc(ycht->rxqueue, len + ycht->rxlen); | 421 ycht->rxqueue = g_realloc(ycht->rxqueue, len + ycht->rxlen); |
425 memcpy(ycht->rxqueue + ycht->rxlen, buf, len); | 422 memcpy(ycht->rxqueue + ycht->rxlen, buf, len); |
483 struct yahoo_data *yd = gc->proto_data; | 480 struct yahoo_data *yd = gc->proto_data; |
484 YchtPkt *pkt; | 481 YchtPkt *pkt; |
485 char *buf; | 482 char *buf; |
486 | 483 |
487 if (source < 0) { | 484 if (source < 0) { |
488 /*ycht_connection_error(ycht, _("Unable to connect."));*/ | 485 ycht_connection_error(ycht, _("Unable to connect.")); |
489 ycht_connection_error(ycht, NULL); | |
490 return; | 486 return; |
491 } | 487 } |
492 | 488 |
493 ycht->fd = source; | 489 ycht->fd = source; |
494 | 490 |
520 if (gaim_proxy_connect(account, | 516 if (gaim_proxy_connect(account, |
521 gaim_account_get_string(account, "ycht-server", YAHOO_YCHT_HOST), | 517 gaim_account_get_string(account, "ycht-server", YAHOO_YCHT_HOST), |
522 gaim_account_get_int(account, "ycht-port", YAHOO_YCHT_PORT), | 518 gaim_account_get_int(account, "ycht-port", YAHOO_YCHT_PORT), |
523 ycht_got_connected, ycht) != 0) | 519 ycht_got_connected, ycht) != 0) |
524 { | 520 { |
525 /*ycht_connection_error(ycht, _("Connection problem"));*/ | 521 ycht_connection_error(ycht, _("Connection problem")); |
526 ycht_connection_error(ycht, NULL); | |
527 return; | 522 return; |
528 } | 523 } |
529 } | 524 } |
530 | 525 |
531 /******************************************************************************************* | 526 /******************************************************************************************* |