diff options
author | James Booth <boothj5@gmail.com> | 2014-04-26 00:36:36 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-04-26 00:36:36 +0100 |
commit | d6e92f62dc907d5da66f477884a4c0c728b84127 (patch) | |
tree | e77d8ad400874baa5edd7dde9ce66b1847fd89e9 /src/jid.c | |
parent | ab4ea80a70803d8d6335d8f5a8a4248e6d5423a4 (diff) | |
download | profani-tty-d6e92f62dc907d5da66f477884a4c0c728b84127.tar.gz |
Fixed cppcheck warnings
Diffstat (limited to 'src/jid.c')
-rw-r--r-- | src/jid.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/jid.c b/src/jid.c index 03bf5144..ab76d5d2 100644 --- a/src/jid.c +++ b/src/jid.c @@ -125,36 +125,6 @@ jid_is_valid_room_form(Jid *jid) } /* - * Given a full room JID of the form - * room@server/nick - * Will create two new strings and point room and nick to them e.g. - * *room = "room@server", *nick = "nick" - * The strings must be freed by the caller - * Returns TRUE if the JID was parsed successfully, FALSE otherwise - */ -gboolean -parse_room_jid(const char * const full_room_jid, char **room, char **nick) -{ - Jid *jid = jid_create(full_room_jid); - - if (jid == NULL) { - return FALSE; - } - - if (jid->resourcepart == NULL) { - jid_destroy(jid); - return FALSE; - } - - *room = strdup(jid->barejid); - *nick = strdup(jid->resourcepart); - - jid_destroy(jid); - - return TRUE; -} - -/* * Given a barejid, and resourcepart, create and return a full JID of the form * barejid/resourcepart * Will return a newly created string that must be freed by the caller @@ -174,28 +144,6 @@ create_fulljid(const char * const barejid, const char * const resource) } /* - * Get the room name part of the full JID, e.g. - * Full JID = "test@conference.server/person" - * returns "test@conference.server" - */ -char * -get_room_from_full_jid(const char * const full_room_jid) -{ - char **tokens = g_strsplit(full_room_jid, "/", 0); - char *room_part = NULL; - - if (tokens != NULL) { - if (tokens[0] != NULL) { - room_part = strdup(tokens[0]); - } - - g_strfreev(tokens); - } - - return room_part; -} - -/* * Get the nickname part of the full JID, e.g. * Full JID = "test@conference.server/person" * returns "person" |