From 97a1943d41d0bf067ddd3b6a465ba447d41923de Mon Sep 17 00:00:00 2001 From: defanor Date: Sat, 9 May 2020 12:17:45 +0300 Subject: 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. --- examples/basic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/basic.c') 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); -- cgit v1.2.3