mirror of https://github.com/BOINC/boinc.git
Implement getMaxSubresults()
git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@421 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
parent
6827fc4be5
commit
846aa6b46f
|
@ -41,17 +41,28 @@ int DC_getMaxMessageSize(void)
|
|||
return MAX_MESSAGE_SIZE;
|
||||
}
|
||||
|
||||
/* Determine the number of allowed subresults by counting all output files
|
||||
* that have a name starting with SUBRESULT_PFX */
|
||||
int DC_getMaxSubresults(void)
|
||||
{
|
||||
/* XXX Return the actually defined subresults */
|
||||
return 10;
|
||||
struct dirent *d;
|
||||
int nsubs;
|
||||
DIR *dir;
|
||||
|
||||
dir = opendir(".");
|
||||
if (!dir)
|
||||
return 0;
|
||||
nsubs = 0;
|
||||
while ((d = readdir(dir)))
|
||||
if (!strncasecmp(d->d_name, SUBRESULT_PFX, strlen(SUBRESULT_PFX)))
|
||||
nsubs++;
|
||||
return nsubs;
|
||||
}
|
||||
|
||||
DC_GridCapabilities DC_getGridCapabilities(void)
|
||||
{
|
||||
/* XXX Add DC_GC_SUBRESULT when it is implemented */
|
||||
return (DC_GridCapabilities)(DC_GC_EXITCODE | DC_GC_STDERR |
|
||||
DC_GC_MESSAGING);
|
||||
DC_GC_SUBRESULT | DC_GC_MESSAGING);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
|
|
Loading…
Reference in New Issue