Changeset: 26caa89f1ffa for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/26caa89f1ffa Modified Files: monetdb5/mal/mal_client.c Branch: clientinfo Log Message:
Allow MCsetClientInfo(c, prop, NULL); diffs (38 lines): diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c --- a/monetdb5/mal/mal_client.c +++ b/monetdb5/mal/mal_client.c @@ -662,29 +662,29 @@ MCsetClientInfo(Client c, const char *pr case 'H': if (strcasecmp(property, "ClientHostname") == 0) { GDKfree(c->client_hostname); - c->client_hostname = GDKstrdup(value); + c->client_hostname = value ? GDKstrdup(value) : NULL; } break; case 'A': if (strcasecmp(property, "ApplicationName") == 0) { GDKfree(c->client_application); - c->client_application = GDKstrdup(value); + c->client_application = value ? GDKstrdup(value) : NULL; } break; case 'L': if (strcasecmp(property, "ClientLibrary") == 0) { GDKfree(c->client_library); - c->client_library = GDKstrdup(value); + c->client_library = value ? GDKstrdup(value) : NULL; } break; case 'R': if (strcasecmp(property, "ClientRemark") == 0) { GDKfree(c->client_remark); - c->client_remark = GDKstrdup(value); + c->client_remark = value ? GDKstrdup(value) : NULL; } break; case 'P': - if (strcasecmp(property, "ClientPid") == 0) { + if (strcasecmp(property, "ClientPid") == 0 && value != NULL) { char *end; long n = strtol(value, &end, 10); if (*value && !*end) _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org