comparison src/server.c @ 5461:7883082c290a

[gaim-migrate @ 5852] Matt Weber (mrweber) writes: " This patch fixes the buffer used for setting away messages, which in turn fixes HTML away messages set by a direct call to serv_set_away[_all] as opposed to do_away_message. Also changed strncpy to strncpy_withhtml to maintain consistency with how it's done in do_away_message." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 20 May 2003 18:15:25 +0000
parents ad445074d239
children cce2d7868c78
comparison
equal deleted inserted replaced
5460:681194d17946 5461:7883082c290a
320 g_free(gc->away_state); 320 g_free(gc->away_state);
321 gc->away_state = NULL; 321 gc->away_state = NULL;
322 } 322 }
323 323
324 if (message) { 324 if (message) {
325 buf = g_malloc(strlen(message) + 1); 325 buf = g_malloc(strlen(message) * 4 + 1);
326 if (gc->flags & OPT_CONN_HTML) 326 if (gc->flags & OPT_CONN_HTML)
327 strncpy(buf, message, strlen(message) + 1); 327 strncpy_withhtml(buf, message, strlen(message) * 4 + 1);
328 else 328 else
329 strncpy_nohtml(buf, message, strlen(message) + 1); 329 strncpy_nohtml(buf, message, strlen(message) + 1);
330 } 330 }
331 331
332 prpl_info->set_away(gc, state, buf); 332 prpl_info->set_away(gc, state, buf);