Mercurial > hg
comparison mcabber/src/jabglue.c @ 357:e8adc3c96e68
Better messages for server connection states
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 23 Jul 2005 11:39:39 +0100 |
parents | 3fe43f6daa5a |
children | 33b8e801ffa6 |
comparison
equal
deleted
inserted
replaced
356:a30ca1b77fa2 | 357:e8adc3c96e68 |
---|---|
137 port = JABBERSSLPORT; | 137 port = JABBERSSLPORT; |
138 else | 138 else |
139 port = JABBERPORT; | 139 port = JABBERPORT; |
140 } | 140 } |
141 | 141 |
142 //if (jc) | 142 jb_disconnect(); |
143 // free(jc); XXX | |
144 | 143 |
145 s_id = 1; | 144 s_id = 1; |
146 jc = jab_new((char*)jid, (char*)pass, port, ssl); | 145 jc = jab_new((char*)jid, (char*)pass, port, ssl); |
147 | 146 |
148 /* These 3 functions can deal with a NULL jc, no worry... */ | 147 /* These 3 functions can deal with a NULL jc, no worry... */ |
578 ut_WriteLog("StateHandler called (state=%d).\n", state); | 577 ut_WriteLog("StateHandler called (state=%d).\n", state); |
579 | 578 |
580 switch(state) { | 579 switch(state) { |
581 case JCONN_STATE_OFF: | 580 case JCONN_STATE_OFF: |
582 if (previous_state != JCONN_STATE_OFF) | 581 if (previous_state != JCONN_STATE_OFF) |
583 scr_LogPrint("+ JCONN_STATE_OFF"); | 582 scr_LogPrint("[Jabber] Not connected to the server"); |
584 | 583 |
585 online = FALSE; | 584 online = FALSE; |
586 mystatus = offline; | 585 mystatus = offline; |
587 roster_free(); | 586 roster_free(); |
588 update_roster = TRUE; | 587 update_roster = TRUE; |
589 break; | 588 break; |
590 | 589 |
591 case JCONN_STATE_CONNECTED: | 590 case JCONN_STATE_CONNECTED: |
592 scr_LogPrint("+ JCONN_STATE_CONNECTED"); | 591 scr_LogPrint("[Jabber] Connected to the server"); |
593 break; | 592 break; |
594 | 593 |
595 case JCONN_STATE_AUTH: | 594 case JCONN_STATE_AUTH: |
596 scr_LogPrint("+ JCONN_STATE_AUTH"); | 595 scr_LogPrint("[Jabber] Authenticating to the server"); |
597 break; | 596 break; |
598 | 597 |
599 case JCONN_STATE_ON: | 598 case JCONN_STATE_ON: |
600 scr_LogPrint("+ JCONN_STATE_ON"); | 599 scr_LogPrint("[Jabber] Communication with the server established"); |
601 online = TRUE; | 600 online = TRUE; |
602 break; | 601 break; |
603 | 602 |
604 case JCONN_STATE_CONNECTING: | 603 case JCONN_STATE_CONNECTING: |
605 scr_LogPrint("+ JCONN_STATE_CONNECTING"); | 604 if (previous_state != state) |
605 scr_LogPrint("[Jabber] Connecting to the server"); | |
606 break; | 606 break; |
607 | 607 |
608 default: | 608 default: |
609 break; | 609 break; |
610 } | 610 } |