X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fdatabase.c;h=5a312f565b76097f77f17dee9914d86110b7a281;hb=014645e6781e165aa2b4473cd73f21daa93f8076;hp=da26ed05f02f9b0fbdf4951c9bb852422565159a;hpb=ce617dd90a2dc6632e7475ab73a887e0fb472c5c;p=pazpar2-moved-to-github.git diff --git a/src/database.c b/src/database.c index da26ed0..5a312f5 100644 --- a/src/database.c +++ b/src/database.c @@ -1,5 +1,5 @@ /* This file is part of Pazpar2. - Copyright (C) 2006-2010 Index Data + Copyright (C) 2006-2011 Index Data Pazpar2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -168,6 +168,7 @@ struct database *new_database(const char *id, NMEM nmem) struct database *db; char hostport[256]; char *dbname; + char *db_comment; struct setting *idset; if (strlen(id) > 255) @@ -177,6 +178,9 @@ struct database *new_database(const char *id, NMEM nmem) *(dbname++) = '\0'; else dbname = ""; + db_comment = strchr(dbname, '#'); + if (db_comment) + *db_comment = '\0'; db = nmem_malloc(nmem, sizeof(*db)); memset(db, 0, sizeof(*db)); db->host = 0;