Changeset: 2ca2d43be403 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ca2d43be403
Modified Files:
tools/merovingian/daemon/multiplex-funnel.c
Branch: Jun2016
Log Message:
Don't let go of the lock between finding and using.
diffs (21 lines):
diff --git a/tools/merovingian/daemon/multiplex-funnel.c
b/tools/merovingian/daemon/multiplex-funnel.c
--- a/tools/merovingian/daemon/multiplex-funnel.c
+++ b/tools/merovingian/daemon/multiplex-funnel.c
@@ -849,8 +849,8 @@ multiplexAddClient(char *mp, int sock, s
if (strcmp(ml->m->name, mp) == 0)
break;
}
- pthread_mutex_unlock(&mpl_lock);
if (ml == NULL) {
+ pthread_mutex_unlock(&mpl_lock);
Mfprintf(stderr, "failed to find multiplex-funnel '%s' for
client %s\n",
mp, name);
mnstr_printf(fout, "!monetdbd: internal error: could not find
multiplex-funnel '%s'\n", mp);
@@ -869,6 +869,7 @@ multiplexAddClient(char *mp, int sock, s
;
w->next = n;
}
+ pthread_mutex_unlock(&mpl_lock);
Mfprintf(m->sout, "mfunnel: added new client %s\n", n->name);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list