Make the server argument optional. Passing a NULL domain arg to xmpp_connect_client()

now derives the domain from the jid.

Is it reasonable to just remove the 'domain' (more properly server) argument directly?
The library should always handle this and I can't think why you'd want to override unless
maybe if you have a proxy.
This commit is contained in:
Ralph Giles
2005-06-29 15:23:51 +00:00
parent f2335adb75
commit 64b85aadda
2 changed files with 17 additions and 5 deletions

View File

@@ -45,12 +45,19 @@ int main(int argc, char **argv)
xmpp_ctx_t *ctx;
xmpp_conn_t *conn;
xmpp_log_t log;
char *jid, *pass;
char *server;
if (argc != 4) {
if ((argc < 3) || (argc > 4)) {
fprintf(stderr, "Usage: basic <jid> <pass> <server>\n\n");
return 1;
}
jid = argv[1];
pass = argv[2];
if (argc >= 4) server = argv[3];
else server = NULL;
/* init library */
xmpp_initialize();