Forget to remove a printf and I removed some unnecessary dealloc code which was causing a crash
This commit is contained in:
@@ -314,8 +314,6 @@
|
||||
|
||||
r = mailimap_fetch([self imapSession], set, fetch_type, &fetch_result);
|
||||
if (r != MAIL_NO_ERROR) {
|
||||
if ( env_list != NULL )
|
||||
mailmessage_list_free(env_list);
|
||||
NSException *exception = [NSException
|
||||
exceptionWithName:CTUnknownError
|
||||
reason:[NSString stringWithFormat:@"Error number: %d",r]
|
||||
@@ -617,7 +615,6 @@ int uid_list_to_env_list(clist * fetch_result, struct mailmessage_list ** result
|
||||
size_t size;
|
||||
|
||||
msg_att = clist_content(cur);
|
||||
printf("number: %d\n", msg_att->att_number);
|
||||
uid = 0;
|
||||
size = 0;
|
||||
for(item_cur = clist_begin(msg_att->att_list); item_cur != NULL; item_cur = clist_next(item_cur)) {
|
||||
|
||||
@@ -15,22 +15,24 @@ int main( int argc, char *argv[ ] )
|
||||
// CTCoreFolder *inbox, *newFolder, *archive;
|
||||
// CTCoreMessage *msgOne;
|
||||
//
|
||||
|
||||
MailCoreEnableLogging();
|
||||
[account connectToServer:@"mail.theronge.com" port:143 connectionType:CONNECTION_TYPE_STARTTLS
|
||||
authType:IMAP_AUTH_TYPE_PLAIN login:@"mronge" password:@""];
|
||||
authType:IMAP_AUTH_TYPE_PLAIN login:@"mronge" password:@"garlicmustard7"];
|
||||
|
||||
//wtf this doesn't work on the INBOX
|
||||
folder = [account folderWithPath:@"INBOX"];
|
||||
//NSLog(@"%@", [folder messageObjectsFromUID:nil]);
|
||||
for (CTCoreMessage *msg in [folder messageObjectsFromUID:nil]) {
|
||||
NSMutableDictionary *msgDict = [NSMutableDictionary dictionary];
|
||||
if([msg from] != nil)
|
||||
[msgDict setObject:[msg from] forKey:@"From"];
|
||||
if([msg to] != nil)
|
||||
[msgDict setObject:[msg to] forKey:@"To"];
|
||||
if([msg subject] != nil)
|
||||
[msgDict setObject:[msg subject] forKey:@"Subject"];
|
||||
[msgDict setObject:[msg uid] forKey:@"UID"];
|
||||
NSLog(@"%@", msgDict);
|
||||
}
|
||||
NSLog(@"%d", [folder totalMessageCount]);
|
||||
/* for (CTCoreMessage *msg in [folder messageObjectsFromIndex:10 toIndex:18]) {
|
||||
NSLog(@"%d", [msg sequenceNumber]);
|
||||
NSLog([msg uid]);
|
||||
}*/
|
||||
// 14
|
||||
//1163978737-3518
|
||||
//CTCoreMessage *msg = [folder messageWithUID:@"1163978737-3518"];
|
||||
//NSLog([msg subject]);
|
||||
NSLog(@"%d", [folder sequenceNumberForUID:@"1163978737-3518"]);
|
||||
[account release];
|
||||
// CTCoreMessage *msg;
|
||||
// NSEnumerator *enumer = [set objectEnumerator];
|
||||
// while ((msg == [enumer nextObject])) {
|
||||
@@ -103,6 +105,6 @@ int main( int argc, char *argv[ ] )
|
||||
|
||||
[pool release];
|
||||
|
||||
while(1) {}
|
||||
//while(1) {}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user