Changeset: 7e1a1c27e483 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7e1a1c27e483
Modified Files:
monetdb5/modules/mal/mal_mapi.c
Branch: Jun2016
Log Message:
Fix the other call to doChallenge after changeset 9596dfbb57e0.
diffs (32 lines):
diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -786,16 +786,20 @@ SERVERclient(void *res, const Stream *In
/* in embedded mode we allow just one client */
data = GDKmalloc(sizeof(*data));
if( data == NULL)
- throw(MAL,"serverClient",MAL_MALLOC_FAIL);
- data->in = *In;
- data->out = *Out;
+ throw(MAL, "mapi.SERVERclient", MAL_MALLOC_FAIL);
+ data->in = block_stream(*In);
+ data->out = block_stream(*Out);
+ if (data->in == NULL || data->out == NULL) {
+ mnstr_destroy(data->in);
+ mnstr_destroy(data->out);
+ GDKfree(data);
+ throw(MAL, "mapi.SERVERclient", MAL_MALLOC_FAIL);
+ }
if (MT_create_thread(&tid, doChallenge, data, MT_THR_DETACHED)) {
- mnstr_printf(data->out, "!internal server error (cannot fork
new "
- "client thread), please try again
later\n");
- mnstr_flush(data->out);
- showException(GDKstdout, MAL, "mapi.SERVERclient",
- "cannot fork new client thread");
+ mnstr_destroy(data->in);
+ mnstr_destroy(data->out);
free(data);
+ throw(MAL, "mapi.SERVERclient", "cannot fork new client
thread");
}
return MAL_SUCCEED;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list