1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-10-06 20:03:46 -04:00

Renamed function in jid

This commit is contained in:
James Booth 2013-01-27 02:00:55 +00:00
parent 8bdab23e25
commit 235339e5a5
3 changed files with 7 additions and 8 deletions

View File

@ -338,7 +338,7 @@ jabber_join(Jid *jid)
void
jabber_change_room_nick(const char * const room, const char * const nick)
{
char *full_room_jid = create_full_room_jid(room, nick);
char *full_room_jid = create_fulljid(room, nick);
xmpp_stanza_t *presence = stanza_create_room_newnick_presence(jabber_conn.ctx,
full_room_jid);
xmpp_send(jabber_conn.conn, presence);
@ -445,7 +445,7 @@ jabber_update_presence(jabber_presence_t status, const char * const msg,
while (rooms != NULL) {
char *room = rooms->data;
char *nick = muc_get_room_nick(room);
char *full_room_jid = create_full_room_jid(room, nick);
char *full_room_jid = create_fulljid(room, nick);
xmpp_stanza_set_attribute(presence, STANZA_ATTR_TO, full_room_jid);
xmpp_send(jabber_conn.conn, presence);

View File

@ -95,7 +95,7 @@ Jid *
jid_create_from_bare_and_resource(const char * const room, const char * const nick)
{
Jid *result;
char *jid = create_full_room_jid(room, nick);
char *jid = create_fulljid(room, nick);
result = jid_create(jid);
free(jid);
@ -158,11 +158,11 @@ parse_room_jid(const char * const full_room_jid, char **room, char **nick)
* Will return a newly created string that must be freed by the caller
*/
char *
create_full_room_jid(const char * const room, const char * const nick)
create_fulljid(const char * const barejid, const char * const resource)
{
GString *full_jid = g_string_new(room);
GString *full_jid = g_string_new(barejid);
g_string_append(full_jid, "/");
g_string_append(full_jid, nick);
g_string_append(full_jid, resource);
char *result = strdup(full_jid->str);

View File

@ -41,8 +41,7 @@ Jid * jid_create_from_bare_and_resource(const char * const room, const char * co
void jid_destroy(Jid *jid);
gboolean jid_is_valid_room_form(Jid *jid);
char * create_full_room_jid(const char * const room,
const char * const nick);
char * create_fulljid(const char * const barejid, const char * const resource);
char * get_room_from_full_jid(const char * const full_room_jid);
char * get_nick_from_full_jid(const char * const full_room_jid);
gboolean parse_room_jid(const char * const full_room_jid, char **room,