netsl_farm() returns an integer array. That array is dynamically allocated and must be freed by the user after the call. The array is at least of size 1. The first element of the array is either 0 or -1. If it is 0, then the call was completed successfully and the array is of size 1. If first element of the array is -1, then at least one of the requests failed. The array is then of size one plus the number of requests and the (1+i)-th element of the array is the error code for the i-th request. Here is an example on how to print error messages:
status = netsl_farm("i=0,200",....); if (status[0] == 0){ fprintf(stderr,"Success\n"); free(status); } else { for (i=1;i<201;i++) { fprintf(stderr,"Request #%d:",i); netslerr(status[i]); } } free(status); |