Set auth properties on XMPPClient

This commit is contained in:
James Booth
2015-05-15 00:58:34 +01:00
parent 62ba2f7ae5
commit 34aca16d4a
7 changed files with 49 additions and 10 deletions

View File

@@ -16,7 +16,9 @@ xmppclient_new(struct sockaddr_in client_addr, int socket)
client->ip = strdup(inet_ntoa(client_addr.sin_addr));
client->port = ntohs(client_addr.sin_port);
client->sock = socket;
client->nickname = NULL;
client->username = NULL;
client->password = NULL;
client->resource = NULL;
return client;
}
@@ -29,6 +31,8 @@ xmppclient_end_session(XMPPClient *client)
close(client->sock);
free(client->ip);
free(client->nickname);
free(client->username);
free(client->password);
free(client->resource);
free(client);
}