Index: src/core/common/tsp_common.h
===================================================================
RCS file: /sources/tsp/tsp/src/core/common/tsp_common.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -r1.14 -r1.15
44a45
> #include <tsp_common_status.h>
Index: src/core/common/tsp_common_status.c
===================================================================
RCS file: /sources/tsp/tsp/src/core/common/tsp_common_status.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -r1.3 -r1.4
58c58
< TSP_STATUS_print(FILE* fs, int32_t TSPStatus) {
---
> TSP_status_print(FILE* fs, int32_t TSPStatus) {
69a70,109
> const char* tsp_status_name[] = { "TSP_STATUS_OK",
> 				  "TSP_STATUS_NOK",
> 				  "TSP_STATUS_ERROR_PROVIDER_UNREACHABLE",
> 				  "TSP_STATUS_ERROR_UNKNOWN",
> 				  "TSP_STATUS_ERROR_SEE_STRING",	
> 				  "TSP_STATUS_ERROR_VERSION",
> 				  "TSP_STATUS_ERROR_SYMBOLS",
> 				  "TSP_STATUS_ERROR_SYMBOL_FILTER",
> 				  "TSP_STATUS_ERROR_NOT_SUPPORTED",
> 				  "TSP_STATUS_ERROR_NOT_IMPLEMENTED",
> 				  "TSP_STATUS_ERROR_PGI_UNKNOWN",
> 				  "TSP_STATUS_ERROR_ASYNC_READ_NOT_ALLOWED",
> 				  "TSP_STATUS_ERROR_ASYNC_WRITE_NOT_ALLOWED",       
> 				  "TSP_STATUS_ERROR_ASYNC_READ_NOT_SUPPORTED",	
> 				  "TSP_STATUS_ERROR_ASYNC_WRITE_NOT_SUPPORTED",     	
> 				  "TSP_STATUS_ERROR_MEMORY_ALLOCATION",				  
> 				  "TSP_STATUS_ERROR_INVALID_CHANNEL_ID",
> 				  "TSP_STATUS_ERROR_NO_MORE_GLU",
> 				  "TSP_STATUS_ERROR_NO_MORE_SESSION",
> 				  "TSP_STATUS_ERROR_GLU_START",
> 				  "TSP_STATUS_ERROR_GLU_INITIALIZE",
> 				  "TSP_STATUS_ERROR_BAD_REQUEST_ORDER",
> 				  "TSP_STATUS_ERROR_DATAPOOL_INSTANTIATE",
> 				  "TSP_STATUS_ERROR_THREAD_CREATE",				  
> 				  "TSP_STATUS_ERROR_NOT_INITIALIZED",				  
> 				  "TSP_STATUS_ERROR_INVALID_REQUEST",
> 				  "TSP_STATUS_ERROR_EMPTY_REQUEST_SAMPLE"
> };
> 
> const char*
> TSP_status_string(int32_t TSPStatus) {
> 	if (TSPStatus<TSP_STATUS_ERROR_EMPTY_REQUEST_SAMPLE) {
> 		return tsp_status_name[TSPStatus];		
> 	}
> 	else {
> 		return "Unknown or invalid TSP Status";		
> 	}		
> } /* End of TSP_status_string */
> 
> 
71c111
< TSP_STATUS_sprint(char* buffer, int32_t buffer_len, int32_t TSPStatus) {
---
> TSP_status_sprint(char* buffer, int32_t buffer_len, int32_t TSPStatus) {
Index: src/core/common/tsp_common_status.h
===================================================================
RCS file: /sources/tsp/tsp/src/core/common/tsp_common_status.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -r1.2 -r1.3
59c59,62
< TSP_STATUS_print(FILE* fs, int32_t TSPStatus);
---
> TSP_status_print(FILE* fs, int32_t TSPStatus);
> 
> _EXPORT_TSP_COMMON const char*
> TSP_status_string(int32_t TSPStatus);
62c65,69
< TSP_STATUS_sprint(char* buffer, int32_t buffer_len, int32_t TSPStatus);
---
> TSP_status_sprint(char* buffer, int32_t buffer_len, int32_t TSPStatus);
> 
> /* compatibility define */
> #define TSP_STATUS_print TSP_status_print
> #define TSP_STATUS_sprint TSP_status_sprint
Index: src/core/driver/tsp_consumer.c
===================================================================
RCS file: /sources/tsp/tsp/src/core/driver/tsp_consumer.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -r1.60 -r1.61
158a159,175
> void
> TSP_consumer_private_goUnreachable(int32_t* retcode, TSP_otsp_t* otsp) 
> {
> 	assert(retcode);	
> 	assert(otsp);
> 	
> 	STRACE_WARNING(("Unable to communicate with provider, going UNREACHABLE."))
> 	*retcode     = TSP_STATUS_ERROR_PROVIDER_UNREACHABLE;
> 	/* 
> 	 * As soon as TSP provider is unreachable flag RPC server as dead i.e. NULL 
> 	 * if we do not flag this we will get SIGPIPE as soons as 
> 	 * we try another rpc call, we may ignore SIGPIPE but this may
> 	 * not be a good choice.
> 	 */
> 	otsp->server = NULL;	
> } /* end of TSP_consumer_private_goUnreachable */
> 
411c428
<   
---
> 
421d437
<   /* Some day, we will find stuff to do here ;) */
426c442
<      the main code may be using them... */
---
>       the main code may be using them... */
428c444
<   STRACE_INFO(("End..."));
---
>   STRACE_INFO(("TSP Consumer End..."));
689,691d704
< 
<  
< 
693c706
<   if(0 != otsp) {
---
>   if(NULL != otsp) {
717c730
<       STRACE_ERROR(("Unable to communicate with the provider"));
---
>       TSP_consumer_private_goUnreachable(&retcode,otsp);
750,751c763,769
<   TSP_request_close(&req_close, otsp->server);
<   otsp->channel_id = TSP_UNDEFINED_CHANNEL_ID;
---
>   if (NULL==TSP_request_close(&req_close, otsp->server)) {
> 	  TSP_consumer_private_goUnreachable(&retcode,otsp);
>   }  
>   else {	  
> 	  otsp->channel_id = TSP_UNDEFINED_CHANNEL_ID;
>   }
>   
792,793c810,814
<     }
< 
---
>     } 
>   else {
> 	  TSP_consumer_private_goUnreachable(&retcode,otsp);  
>   }
>   
795d815
< 
802,804d821
<   else {
<     STRACE_ERROR(("Unable to communicate with the provider"));
<   }
854c871,874
<     }
---
>     } 
>   else {
> 	  TSP_consumer_private_goUnreachable(&retcode,otsp);
>   }
861,863d880
<   else {
<     STRACE_ERROR(("Unable to communicate with the provider"));    
<   }
920,921c937
<     retcode = TSP_STATUS_ERROR_PROVIDER_UNREACHABLE;
<     STRACE_ERROR(("Unable to communicate with the provider"));    
---
> 	  TSP_consumer_private_goUnreachable(&retcode,otsp);
932c948
<   TSP_CHECK_SESSION(otsp, 0);
---
>   TSP_CHECK_SESSION(otsp, NULL);
941c957
<   TSP_CHECK_SESSION(otsp, 0);
---
>   TSP_CHECK_SESSION(otsp, NULL);
995,997c1011,1012
<     STRACE_ERROR(("Unable to communicate with the provider"));    
<     retcode = TSP_STATUS_ERROR_PROVIDER_UNREACHABLE;
<     return retcode;
---
> 	  TSP_consumer_private_goUnreachable(&retcode,otsp);
> 	  return retcode;
1046c1061,1062
<       STRACE_ERROR(("Function TSP_group_create_group_table failed"));	   
---
> 	    retcode = TSP_STATUS_ERROR_MEMORY_ALLOCATION;	    
> 	    STRACE_ERROR(("Function TSP_group_create_group_table failed"));	   
1158c1174
<       STRACE_ERROR(("Unable to communicate with the provider"));
---
> 	    TSP_consumer_private_goUnreachable(&retcode,otsp);
1204,1205c1220
<       retcode = TSP_STATUS_ERROR_PROVIDER_UNREACHABLE;
<       STRACE_WARNING(("Unable to communicate with the provider"));            
---
> 	    TSP_consumer_private_goUnreachable(&retcode,otsp);
1208c1223
<     /* Destroy our socket */
---
>   /* Destroy our socket */
1231c1246
<   assert(otsp->sample_fifo!=0);
---
>   assert(NULL!=otsp->sample_fifo);
1258c1273
< 	      retcode = TSP_STATUS_ERROR_PROVIDER_UNREACHABLE;
---
> 	      TSP_consumer_private_goUnreachable(&retcode,otsp);
1304c1319
<   if(0 != otsp) { 
---
>   if(NULL != otsp) { 
1307c1322
<       ret = *result; 
---
> 	    ret = *result; 
1309c1324
<       STRACE_DEBUG(("result is <0x%X>\n", (unsigned int) result));      
---
> 	    TSP_consumer_private_goUnreachable(&ret, otsp);	    
1312c1327
<     STRACE_ERROR(("This provider is not instanciate"));
---
>     STRACE_ERROR(("This provider is not in a valid state (missing 'TSP_consumer_connect_url'?"));
1336c1351
<   if(0 != otsp) {   
---
>   if(NULL != otsp) {   
1344c1359
<       ret=TSP_STATUS_ERROR_UNKNOWN;
---
> 	    TSP_consumer_private_goUnreachable(&ret,otsp);
1366c1381
<     STRACE_ERROR(("This provider is not instanciate"));
---
>     STRACE_ERROR(("This provider is not in a valid state (missing 'TSP_consumer_connect_url'?"));
1439a1455,1456
> 
> 
Index: src/core/rpc/tsp_client.c
===================================================================
RCS file: /sources/tsp/tsp/src/core/rpc/tsp_client.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -r1.20 -r1.21
79c79
<     STRACE_ERROR(("ERROR : GLOBAL clnt_create failed for host <%s> / progid <%d/0x%08X>", target_name, progid,progid));
---
>     STRACE_DEBUG(("ERROR : GLOBAL clnt_create failed for host <%s> / progid <%d/0x%08X>", target_name, progid,progid));
Index: src/consumers/CMakeLists.txt
===================================================================
RCS file: /sources/tsp/tsp/src/consumers/CMakeLists.txt,v
retrieving revision 1.5
retrieving revision 1.6
diff -r1.5 -r1.6
28c28,29
<   IF (OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND)
---
>   FIND_PACKAGE(X11)
>   IF (OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND AND X11_FOUND)
30c31
<   ELSE (OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND)
---
>   ELSE (OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND AND X11_FOUND)
32c33
<   ENDIF (OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND)
---
>   ENDIF (OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND AND X11_FOUND)
Index: src/consumers/ascii_writer/tsp_ascii_writer.c
===================================================================
RCS file: /sources/tsp/tsp/src/consumers/ascii_writer/tsp_ascii_writer.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -r1.30 -r1.31
50a51
> #include <tsp_common.h>
812,813c813,814
<       if (TSP_STATUS_OK!=TSP_consumer_request_sample_destroy(myprovider)) {
< 	STRACE_ERROR(("TSP_request_sample_destroy ERROR??..."));
---
> 	    if (TSP_STATUS_OK!=(retcode=TSP_consumer_request_sample_destroy(myprovider))) {
> 		    STRACE_ERROR(("TSP_request_sample_destroy ERROR: %s",TSP_status_string(retcode)));
816,817c817,818
<     if (TSP_STATUS_OK!=TSP_consumer_request_close(myprovider)) {
<       STRACE_ERROR(("TSP_request_close ERROR??..."));
---
>     if (TSP_STATUS_OK!=(retcode=TSP_consumer_request_close(myprovider))) {
> 	    STRACE_ERROR(("TSP_request_close ERROR: %s",TSP_status_string(retcode)));
Index: src/consumers/ascii_writer/tsp_ascii_writer_config.lex
===================================================================
RCS file: /sources/tsp/tsp/src/consumers/ascii_writer/tsp_ascii_writer_config.lex,v
retrieving revision 1.7
retrieving revision 1.8
diff -r1.7 -r1.8
37a38
> %pointer yytext;
44d44
< extern char *yytext;
