From f741b68de841fa3fc61d6a1aec15fa4d308f8f9a Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Tue, 14 Jun 2005 14:47:12 +0000 Subject: [PATCH] Use the jid utilities in _get_authid(). --- src/auth.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/auth.c b/src/auth.c index 476d466..d635b82 100644 --- a/src/auth.c +++ b/src/auth.c @@ -106,15 +106,11 @@ static int _handle_features(xmpp_conn_t * const conn, static char *_get_authid(xmpp_conn_t * const conn) { char *authid = NULL; - char *at; if (conn->type == XMPP_CLIENT) { /* authid is the node portion of jid */ if (!conn->jid) return NULL; - authid = xmpp_strdup(conn->ctx, conn->jid); - if (!authid) return NULL; - at = strchr(authid, '@'); - at[0] = 0; + authid = xmpp_jid_node(conn->ctx, conn->jid); } return authid;