void vortex_sasl_start_auth_sync VortexConnection connection,
gchar *  profile,
VortexStatus status,
gchar **  status_message
 

Perform SASL negotiation in a synchronous mode (blocking the caller until process finish).

This function does the same like vortex_sasl_start_auth but in a blocking manner. Check documentation this this function at vortex_sasl_start_auth.

Here is an example:

 // some variable declaration for SASL status
 VortexStatus   status;
 gchar        * status_message;
 
 // set required properties
 vortex_sasl_set_propertie (connection, VORTEX_SASL_AUTH_ID,  
                            "bob", NULL);
 vortex_sasl_set_propertie (connection, VORTEX_SASL_PASSWORD, 
                            "secret", NULL);
                            
 // begin SASL negotiation
 vortex_sasl_start_auth_sync (connection, VORTEX_SASL_CRAM_MD5,
                              &status, &status_message);
 // write out error
 switch (status) {
 case VortexOk:
        g_print ("OK: message reported: %s\n", status_message);
        break;
 case VortexError:
        g_print ("FAIL: message reported: %s\n", status_message);
        break;
 }

See Using SASL at client side for a detailed explanation about SASL support inside Vortex for the client side.

Parameters:
connection The connection where the SASL negotiation will take place.
profile The SASL profile selected.
status A reference to a VortexStatus variable to notify caller SASL finish status.
status_message A reference to notify the caller a textual diagnostic about SASL finish status.