示例#1
0
int users_probe_all(){
DIR *dir;
Stream *s;
struct dirent *de;
struct stat st;
int r;

	s=jabber_stream();
	if (!s) return -1;
	dir=opendir(".");
	if (!dir){
		g_warning(L_("Couldn't open '%s' directory: %s"),spool_dir,g_strerror(errno));
		return -1;
	}
	while((de=readdir(dir))){
		r=stat(de->d_name,&st);
		if (r){
			g_warning(L_("Couldn't stat '%s': %s"),de->d_name,g_strerror(errno));
			continue;
		}
		if (S_ISREG(st.st_mode) && strchr(de->d_name,'@')) 
			presence_send_probe(s,NULL,de->d_name);
	}
	closedir(dir);
	return 0;
}
示例#2
0
gboolean sessions_reconnect(gpointer data){
char *jid;

	jid=(char *)data;
	presence_send_probe(jabber_stream(),NULL,jid);
	g_free(jid);
	return FALSE;
}