Mercurial > pidgin
comparison src/main.c @ 4800:4af15fbcb00a
[gaim-migrate @ 5120]
Paco-Paco is cool, he fixed my mess, and then fixed other messes I didn't
even know we had.
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Sun, 16 Mar 2003 17:49:11 +0000 |
| parents | 677d3cb193a1 |
| children | 9b51c090236a |
comparison
equal
deleted
inserted
replaced
| 4799:7fd8a82a7c36 | 4800:4af15fbcb00a |
|---|---|
| 473 GError *error; | 473 GError *error; |
| 474 | 474 |
| 475 debug_printf("Core says: "); | 475 debug_printf("Core says: "); |
| 476 g_io_channel_read_chars(source, &type, sizeof(type), &x, &error); | 476 g_io_channel_read_chars(source, &type, sizeof(type), &x, &error); |
| 477 if(error) | 477 if(error) |
| 478 g_free(error); | 478 g_error_free(error); |
| 479 if (x == 0) { | 479 if (x == 0) { |
| 480 debug_printf("CORE IS GONE!\n"); | 480 debug_printf("CORE IS GONE!\n"); |
| 481 g_io_channel_shutdown(source, TRUE, &error); | 481 g_io_channel_shutdown(source, TRUE, &error); |
| 482 if(error) | 482 if(error) |
| 483 g_free(error); | 483 g_free(error); |
| 484 return FALSE; | 484 return FALSE; |
| 485 } | 485 } |
| 486 debug_printf("%d ", type); | 486 debug_printf("%d ", type); |
| 487 g_io_channel_read_chars(source, &subtype, sizeof(subtype), &x, &error); | 487 g_io_channel_read_chars(source, &subtype, sizeof(subtype), &x, &error); |
| 488 if(error) | 488 if(error) |
| 489 g_free(error); | 489 g_error_free(error); |
| 490 if (x == 0) { | 490 if (x == 0) { |
| 491 debug_printf("CORE IS GONE!\n"); | 491 debug_printf("CORE IS GONE!\n"); |
| 492 g_io_channel_shutdown(source, TRUE, &error); | 492 g_io_channel_shutdown(source, TRUE, &error); |
| 493 if(error) | 493 if(error) |
| 494 g_free(error); | 494 g_error_free(error); |
| 495 return FALSE; | 495 return FALSE; |
| 496 } | 496 } |
| 497 debug_printf("%d ", subtype); | 497 debug_printf("%d ", subtype); |
| 498 g_io_channel_read_chars(source, (guchar *)&len, sizeof(len), &x, &error); | 498 g_io_channel_read_chars(source, (guchar *)&len, sizeof(len), &x, &error); |
| 499 if(error) | 499 if(error) |
| 500 g_free(error); | 500 g_error_free(error); |
| 501 if (x == 0) { | 501 if (x == 0) { |
| 502 debug_printf("CORE IS GONE!\n"); | 502 debug_printf("CORE IS GONE!\n"); |
| 503 g_io_channel_shutdown(source, TRUE, &error); | 503 g_io_channel_shutdown(source, TRUE, &error); |
| 504 if(error) | 504 if(error) |
| 505 g_free(error); | 505 g_error_free(error); |
| 506 return FALSE; | 506 return FALSE; |
| 507 } | 507 } |
| 508 debug_printf("(%d bytes)\n", len); | 508 debug_printf("(%d bytes)\n", len); |
| 509 | 509 |
| 510 data = g_malloc(len); | 510 data = g_malloc(len); |
| 511 g_io_channel_read_chars(source, data, len, &x, &error); | 511 g_io_channel_read_chars(source, data, len, &x, &error); |
| 512 if(error) | 512 if(error) |
| 513 g_free(error); | 513 g_error_free(error); |
| 514 if (x != len) { | 514 if (x != len) { |
| 515 debug_printf("CORE IS GONE! (read %d/%d bytes)\n", x, len); | 515 debug_printf("CORE IS GONE! (read %d/%d bytes)\n", x, len); |
| 516 g_free(data); | 516 g_free(data); |
| 517 g_io_channel_shutdown(source, TRUE, &error); | 517 g_io_channel_shutdown(source, TRUE, &error); |
| 518 if(error) | 518 if(error) |
| 519 g_free(error); | 519 g_error_free(error); |
| 520 return FALSE; | 520 return FALSE; |
| 521 } | 521 } |
| 522 | 522 |
| 523 g_free(data); | 523 g_free(data); |
| 524 return TRUE; | 524 return TRUE; |
