fix obvious error in thread enumeration

This commit is contained in:
Ron Pedde 2005-11-15 06:43:31 +00:00
parent 341b3a750d
commit 9f5eabdabf
2 changed files with 5 additions and 4 deletions

View File

@ -1259,8 +1259,7 @@ void config_set_status(WS_CONNINFO *pwsc, int session, char *fmt, ...) {
/* new info */
pfirst=(SCAN_STATUS*)malloc(sizeof(SCAN_STATUS));
if(pfirst) {
pfirst->what = strdup(buffer);
pfirst->session = session;
pfirst->what = NULL;
pfirst->thread = pwsc->threadno;
pfirst->host = strdup(pwsc->hostname);
ws_set_local_storage(pwsc,pfirst,config_freescan);

View File

@ -1573,14 +1573,16 @@ void ws_set_local_storage(WS_CONNINFO *pwsc, void *ptr, void (*callback)(void *)
*/
WS_CONNINFO *ws_thread_enum_first(WSHANDLE wsh, WSTHREADENUM *vpp) {
WS_PRIVATE *pwsp;
WS_CONNINFO *pwsc;
WS_CONNINFO *pwsc = NULL;
WS_CONNLIST *pconlist;
pwsp = (WS_PRIVATE *)wsh;
ws_lock_connlist(pwsp);
pconlist = pwsp->connlist.next;
pwsc = pconlist->pwsc;
if(pconlist) {
pwsc = pconlist->pwsc;
}
*vpp = (WSTHREADENUM)pconlist;
if(pwsc == NULL) {