X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Ftests%2Ftest_silcclient.c;h=839b084b5c12da6879f47b9eb4817192bbc739da;hb=ce6ade69cd8e0aeca9ef097b2ceec9d43186d91f;hp=f93a36f135ad93c79f5c6a0107c5e7c42daf798a;hpb=6e259b8f13ead96a13f6a5467487ea2e7b64c248;p=silc.git diff --git a/lib/silcclient/tests/test_silcclient.c b/lib/silcclient/tests/test_silcclient.c index f93a36f1..839b084b 100644 --- a/lib/silcclient/tests/test_silcclient.c +++ b/lib/silcclient/tests/test_silcclient.c @@ -26,7 +26,8 @@ typedef struct { static void silc_connected(SilcClient client, SilcClientConnection conn, - SilcClientConnectionStatus status, const char *message, + SilcClientConnectionStatus status, + SilcStatus error, const char *message, void *context) { MyBot mybot = client->application; @@ -72,14 +73,9 @@ int mybot_start(void) return 1; } - /* Now fill the allocated client with mandatory parameters the library - requires: username, hostname and "real name". */ - mybot->client->username = silc_get_username(); - mybot->client->hostname = silc_net_localhost(); - mybot->client->realname = strdup("I am the MyBot"); - /* Now we initialize the client. */ - if (!silc_client_init(mybot->client)) { + if (!silc_client_init(mybot->client, silc_get_username(), + silc_net_localhost(), "I am the MyBot")) { perror("Could not init client"); return 1; }