using imclient

Patrick Welche prlw1 at newn.cam.ac.uk
Thu Mar 17 13:21:41 EST 2005


On Wed, Mar 16, 2005 at 04:04:48PM -0500, Patrick Radtke wrote:
> I'll add a little code sample
> 
> // server returns NO on an error
> imclient_addcallback(imclient, "NO",
> 		       CALLBACK_NOLITERAL,
> 		       callback_error,
> 		       &error_string,
> 		       NULL);
> 
>  nc =1;
>   imclient_send(imclient,end_command,(void*) &nc,"create 
> \"user/bigtestuser3\"");
>  while(nc > 0) {
>     imclient_processoneevent(imclient);
>       }
> cout << "create data is " << error_string << endl;
> 
> 
> So bigtestuser3 already exists. So I would expect the imap server to 
> return 'NO Mailbox already exists'.
> So I add a callback on the keyword 'NO', but it never gets called. Are 
> there other settings I need to use on the callback?

Just experimenting, you could try CALLBACK_NUMBERED instead of
CALLBACK_NOLITERAL, or just NULL, and you could even use "" instead
of "NO" at least to start by catching all responses..

Cheers,

Patrick
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list