Revision be521750

View differences:

ALTOclient/ALTOclient.c
1141 1141
static int queryState = ALTO_QUERY_READY;
1142 1142

  
1143 1143
static pthread_t threadId;
1144
static pthread_attr_t attr;
1144 1145

  
1145 1146
typedef struct {
1146 1147
	ALTO_GUIDANCE_T* list;
......
1199 1200

  
1200 1201
	threadArgs.list = list;
1201 1202
	threadArgs.num = num;
1202

  
1203
	assertCheck(
1204
		pthread_create(&threadId, NULL, alto_query_thread_func, &threadArgs) == 0, 
1205
		"pthread_create failed!"
1206
	);
1203
	pthread_attr_init(&attr);
1204
	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
1205
	if (pthread_create(&threadId, &attr, alto_query_thread_func, &threadArgs) != 0) {
1206
		fprintf(stderr,"[ALTOclient] pthread_create failed!\n");
1207
		queryState = ALTO_QUERY_READY;
1208
		return 0;
1209
	}
1207 1210

  
1208 1211
	// This should be it
1209 1212
	return 1;

Also available in: Unified diff