Module Name: src
Committed By: pooka
Date: Wed Nov 24 14:32:42 UTC 2010
Modified Files:
src/lib/librumpuser: sp_common.c
Log Message:
missed part of earlier commit
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/librumpuser/sp_common.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/librumpuser/sp_common.c
diff -u src/lib/librumpuser/sp_common.c:1.6 src/lib/librumpuser/sp_common.c:1.7
--- src/lib/librumpuser/sp_common.c:1.6 Fri Nov 19 17:09:44 2010
+++ src/lib/librumpuser/sp_common.c Wed Nov 24 14:32:42 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sp_common.c,v 1.6 2010/11/19 17:09:44 pooka Exp $ */
+/* $NetBSD: sp_common.c,v 1.7 2010/11/24 14:32:42 pooka Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -117,11 +117,14 @@
struct spclient {
int spc_fd;
+ int spc_refcnt;
+ int spc_dying;
struct lwp *spc_mainlwp;
pid_t spc_pid;
- /* incoming */
+ struct pollfd *spc_pfd;
+
struct rsp_hdr spc_hdr;
uint8_t *spc_buf;
size_t spc_off;
@@ -256,7 +259,7 @@
int rv = 0;
pthread_mutex_lock(&spc->spc_mtx);
- while (rw->rw_data == NULL) {
+ while (rw->rw_data == NULL && spc->spc_dying == 0) {
/* are we free to receive? */
if (spc->spc_istatus == SPCSTATUS_FREE) {
int gotresp;