int main(int argc, char** argv) { setvbuf(stdin, 0, 2, 0); uint32_t i; uint32_t choice; for(i=0; i <= 9; i++) { //memset(NODE_HEAD+88*i, 0, 88); // 88 == 0x58 memset(head[i], 0, sizeof(struct node)); } printf("%s", menu); scanf("%u%*c", &choice); switch(choice) { case 1: createCon(head); break; case 2: removeCon(head); break; case 3: editCon(head); break; case 4: printCon(head); break; default: puts("Invalid option"); break; } puts("Thanks for trying out the demo, sadly your contacts are now erased"); return 0; }
MSNConnection::~MSNConnection(void) { if ( fRunner ) delete fRunner; if ( fKeepAliveRunner ) delete fKeepAliveRunner; if ( fServer ) free(fServer); // snooze(1000); StopReceiver(); if (fSock > 0) close(fSock); BMessage removeCon(msnmsgRemoveConnection), reply; removeCon.AddPointer("connection", this); // There's a slight risk with not having the reply here, I think. // At least there used to be, a race condition with the MSNManager // reading the connection's host and port. /ME fManMsgr.SendMessage(&removeCon/*, reply*/); };