diff options
author | defanor <defanor@uberspace.net> | 2020-05-09 12:17:45 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2020-05-09 12:17:45 +0300 |
commit | 97a1943d41d0bf067ddd3b6a465ba447d41923de (patch) | |
tree | 87cc7fbc01724478f1bc49ab1542611b295885a4 /examples/basic.c | |
parent | a94e340cc77152535383d53dbbaecd5076201a1c (diff) |
Wrap the SASL property callback
So that a library user's SASL property callback gets a pointer to the
whole rexmpp structure at once, similarly to other callbacks.
Diffstat (limited to 'examples/basic.c')
-rw-r--r-- | examples/basic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/basic.c b/examples/basic.c index d869f77..4ae0f8f 100644 --- a/examples/basic.c +++ b/examples/basic.c @@ -24,16 +24,16 @@ void my_logger (rexmpp_t *s, int priority, const char *fmt, va_list args) { fprintf(stderr, "\n"); } -int my_sasl_property_cb (Gsasl * ctx, Gsasl_session * sctx, Gsasl_property prop) { +int my_sasl_property_cb (rexmpp_t *s, Gsasl_property prop) { if (prop == GSASL_PASSWORD) { char buf[4096]; printf("password: "); gets(buf); - gsasl_property_set (sctx, GSASL_PASSWORD, buf); + gsasl_property_set (s->sasl_session, GSASL_PASSWORD, buf); return GSASL_OK; } if (prop == GSASL_AUTHID) { - gsasl_property_set (sctx, GSASL_AUTHID, "test"); + gsasl_property_set (s->sasl_session, GSASL_AUTHID, "test"); return GSASL_OK; } printf("unhandled gsasl property: %d\n", prop); |