1
0
Fork 0

Renamed create jid function using barejid and resource

This commit is contained in:
James Booth 2013-01-27 01:14:59 +00:00
parent 1a30ee15e0
commit 8bdab23e25
4 changed files with 5 additions and 5 deletions

View File

@ -1828,7 +1828,7 @@ _cmd_join(gchar **args, struct cmd_help_t help)
jid_destroy(jid);
}
Jid *room_jid = jid_create_room_jid(room, nick);
Jid *room_jid = jid_create_from_bare_and_resource(room, nick);
if (!muc_room_is_active(room_jid)) {
jabber_join(room_jid);

View File

@ -92,7 +92,7 @@ jid_create(const gchar * const str)
}
Jid *
jid_create_room_jid(const char * const room, const char * const nick)
jid_create_from_bare_and_resource(const char * const room, const char * const nick)
{
Jid *result;
char *jid = create_full_room_jid(room, nick);

View File

@ -37,7 +37,7 @@ struct jid_t {
typedef struct jid_t Jid;
Jid * jid_create(const gchar * const str);
Jid * jid_create_room_jid(const char * const room, const char * const nick);
Jid * jid_create_from_bare_and_resource(const char * const room, const char * const nick);
void jid_destroy(Jid *jid);
gboolean jid_is_valid_room_form(Jid *jid);

View File

@ -107,14 +107,14 @@ void create_jid_from_bare_returns_domainpart(void)
void create_room_jid_returns_room(void)
{
Jid *result = jid_create_room_jid("room@conference.domain.org", "myname");
Jid *result = jid_create_from_bare_and_resource("room@conference.domain.org", "myname");
assert_string_equals("room@conference.domain.org", result->barejid);
}
void create_room_jid_returns_nick(void)
{
Jid *result = jid_create_room_jid("room@conference.domain.org", "myname");
Jid *result = jid_create_from_bare_and_resource("room@conference.domain.org", "myname");
assert_string_equals("myname", result->resourcepart);
}