mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 17:06:22 +00:00
Fixed string handling on login message
This commit is contained in:
6
jabber.c
6
jabber.c
@@ -150,8 +150,10 @@ static void _jabber_conn_handler(xmpp_conn_t * const conn,
|
|||||||
xmpp_ctx_t *ctx = (xmpp_ctx_t *)userdata;
|
xmpp_ctx_t *ctx = (xmpp_ctx_t *)userdata;
|
||||||
|
|
||||||
if (status == XMPP_CONN_CONNECT) {
|
if (status == XMPP_CONN_CONNECT) {
|
||||||
char line[100];
|
const char *jid = xmpp_conn_get_jid(conn);
|
||||||
sprintf(line, "%s logged in successfully.", xmpp_conn_get_jid(conn));
|
const char *msg = " logged in successfully.";
|
||||||
|
char line[strlen(jid) + strlen(msg) + 2];
|
||||||
|
sprintf(line, "%s %s", xmpp_conn_get_jid(conn), msg);
|
||||||
title_bar_connected();
|
title_bar_connected();
|
||||||
|
|
||||||
cons_good_show(line);
|
cons_good_show(line);
|
||||||
|
|||||||
Reference in New Issue
Block a user