return 0;
}
-static int auth_callback(struct pakfire_client* client,
- pakfire_client_auth_status status, void* data) {
+static int ready_callback(struct pakfire_client* client, void* data) {
int* r = data;
- // Set the status
- *r = status;
+ // If we get here, we set the status to zero
+ *r = 0;
return 0;
}
struct cli_global_args* global_args = data;
struct cli_local_args local_args = {};
struct pakfire_client* client = NULL;
- int status = 0;
+ int status = 1;
int r;
// Parse the command line
if (r < 0)
goto ERROR;
- // Set the authentication callback
- r = pakfire_client_set_auth_callback(client, auth_callback, &status);
- if (r < 0)
- goto ERROR;
+ // Set the ready callback
+ pakfire_client_set_ready_callback(client, ready_callback, &status);
// Authenticate
r = pakfire_client_auth_user(client, local_args.username, local_args.password);