comparison mcabber/src/jabglue.c @ 419:2f9852610cf4

Small code review Some clean up and security checks
author Mikael Berthe <mikael@lilotux.net>
date Fri, 02 Sep 2005 20:34:17 +0200
parents 48e7808c4191
children 04a0b450380b
comparison
equal deleted inserted replaced
418:05bcc91b8699 419:2f9852610cf4
98 { 98 {
99 char *ptr; 99 char *ptr;
100 char *alias; 100 char *alias;
101 101
102 while ((alias = g_strdup(jid)) == NULL) 102 while ((alias = g_strdup(jid)) == NULL)
103 usleep(100); 103 safe_usleep(100);
104 104
105 if ((ptr = strchr(alias, '/')) != NULL) { 105 if ((ptr = strchr(alias, '/')) != NULL) {
106 *ptr = 0; 106 *ptr = 0;
107 } 107 }
108 return alias; 108 return alias;
194 { 194 {
195 xmlnode x, z; 195 xmlnode x, z;
196 char *cid; 196 char *cid;
197 197
198 if (!online) { 198 if (!online) {
199 usleep(10000); 199 safe_usleep(10000);
200 return; 200 return;
201 } 201 }
202 202
203 if (jc && jc->state == JCONN_STATE_CONNECTING) { 203 if (jc && jc->state == JCONN_STATE_CONNECTING) {
204 usleep(75000); 204 safe_usleep(75000);
205 jab_start(jc); 205 jab_start(jc);
206 return; 206 return;
207 } 207 }
208 208
209 jab_poll(jc, 50); 209 jab_poll(jc, 50);