Mercurial > pidgin
comparison src/protocols/toc/toc.c @ 2136:73253b36c3cb
[gaim-migrate @ 2146]
i wonder if this will help anything.
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Wed, 08 Aug 2001 19:13:01 +0000 |
| parents | 50c7a704ee56 |
| children | 18722ae5b882 |
comparison
equal
deleted
inserted
replaced
| 2135:1779daad8cc3 | 2136:73253b36c3cb |
|---|---|
| 742 } | 742 } |
| 743 | 743 |
| 744 static int toc_send_im(struct gaim_connection *gc, char *name, char *message, int away) | 744 static int toc_send_im(struct gaim_connection *gc, char *name, char *message, int away) |
| 745 { | 745 { |
| 746 char buf[BUF_LEN * 2]; | 746 char buf[BUF_LEN * 2]; |
| 747 | 747 char *tmp = g_malloc(strlen(message) * 2); |
| 748 escape_text(message); | 748 |
| 749 if (strlen(message) + 52 > MSG_LEN) | 749 strcpy(tmp, message); |
| 750 escape_text(tmp); | |
| 751 if (strlen(tmp) + 52 > MSG_LEN) { | |
| 752 g_free(tmp); | |
| 750 return -E2BIG; | 753 return -E2BIG; |
| 754 } | |
| 751 g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name), | 755 g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name), |
| 752 message, ((away) ? " auto" : "")); | 756 tmp, ((away) ? " auto" : "")); |
| 753 sflap_send(gc, buf, -1, TYPE_DATA); | 757 sflap_send(gc, buf, -1, TYPE_DATA); |
| 754 | 758 |
| 759 g_free(tmp); | |
| 755 return 0; | 760 return 0; |
| 756 } | 761 } |
| 757 | 762 |
| 758 static void toc_set_config(struct gaim_connection *gc) | 763 static void toc_set_config(struct gaim_connection *gc) |
| 759 { | 764 { |
