Problem with AIM

Duncan Berriman duncan at
Mon Jan 27 10:32:47 EST 2014


I did some more work on my code which may be of use to others as I see quite
a number of questions re capturing and responding to requests when using
libpurple as a robot or headless.

This works as I can see the callback working (the request is closed) and the
program manages to logon to AIM without the certificate present but I'm not
sure it is totally correct. I can also see it fail to connect (as expected)
if I change the code to do 'Reject' instead of 'Accept'.

I'd appreciate any help/advice/pointers you may be able to give, please
forgive my limited understanding.

In particular I'm not sure if the parameters user_data and j are correct.
They were my best guess.


static void *pidgin_request_action(const char *title, const char *primary,
const char *secondary, int default_action,
PurpleAccount *account, const char *who, PurpleConversation *conv,
void *user_data, size_t action_count, va_list actions)

	sprintf(message,"Request action title: %s primary: %s secondary:
%s", title, primary, secondary);

	if (strcmp(title,"SSL Certificate Verification") == 0) {

		int i,j;
		const char *text;
		PurpleRequestActionCb savecallback;
		PurpleRequestActionCb callback;
		for (i = 0; i < action_count; i++) {
			text = va_arg(actions, const char *);
			callback = va_arg(actions, PurpleRequestActionCb);
			char *s = (char *)text;
			if (strcmp(s,"Accept") == 0) {
				savecallback = callback;
				j = i;

		if (savecallback) {


More information about the Devel mailing list