- client: fix crash

svn path=/trunk/boinc/; revision=17550
This commit is contained in:
David Anderson 2009-03-06 23:27:19 +00:00
parent e1b94a1e53
commit cd4786166a
2 changed files with 17 additions and 2 deletions

View File

@ -2870,3 +2870,8 @@ David 6 Mar 2009
client_types.h
lib/
coproc.h
David 6 Mar 2009
- client: fix crash
lib/
coproc.h

View File

@ -49,12 +49,22 @@ struct COPROC {
#ifndef _USING_FCGI_
virtual void write_xml(MIOFILE&);
#endif
inline void clear() {
// can't just memcpy() - trashes vtable
type[0] = 0;
count = 0;
used = 0;
req_secs = 0;
req_instances = 0;
estimated_delay = 0;
memset(owner, 0, sizeof(owner));
}
COPROC(const char* t){
memset(this, 0, sizeof(COPROC));
clear();
strcpy(type, t);
}
COPROC() {
memset(this, 0, sizeof(COPROC));
clear();
}
virtual ~COPROC(){}
int parse(MIOFILE&);