comparison mcabber/src/jabglue.c @ 756:12dc6bdff8c1

Check for events timeout
author Mikael Berthe <mikael@lilotux.net>
date Tue, 14 Mar 2006 12:22:35 +0100
parents 5b962b978573
children 464be13343a9
comparison
equal deleted inserted replaced
755:b747f76e57ae 756:12dc6bdff8c1
169 } 169 }
170 170
171 void jb_main() 171 void jb_main()
172 { 172 {
173 time_t now; 173 time_t now;
174 static time_t last_iqs_check = 0; 174 static time_t last_eviqs_check = 0;
175 175
176 if (!online) { 176 if (!online) {
177 safe_usleep(10000); 177 safe_usleep(10000);
178 return; 178 return;
179 } 179 }
214 statehandler(jc, JCONN_STATE_OFF); 214 statehandler(jc, JCONN_STATE_OFF);
215 } 215 }
216 216
217 time(&now); 217 time(&now);
218 218
219 // Check for IQ requests timeouts 219 // Check for EV & IQ requests timeouts
220 if (now > last_iqs_check + 20) { 220 if (now > last_eviqs_check + 20) {
221 iqs_check_timeout(now); 221 iqs_check_timeout(now);
222 last_iqs_check = now; 222 evs_check_timeout(now);
223 last_eviqs_check = now;
223 } 224 }
224 225
225 // Keepalive 226 // Keepalive
226 if (KeepaliveDelay) { 227 if (KeepaliveDelay) {
227 if (now > LastPingTime + (time_t)KeepaliveDelay) 228 if (now > LastPingTime + (time_t)KeepaliveDelay)