|
|
@@ -251,6 +251,35 @@ parse_error:
|
|
|
return (-1);
|
|
|
}
|
|
|
|
|
|
+static char * strsep_cs(char **stringp, const char *delim)
|
|
|
+{
|
|
|
+ char *s;
|
|
|
+ const char *spanp;
|
|
|
+ int c, sc;
|
|
|
+ char *tok;
|
|
|
+
|
|
|
+ if ((s = *stringp) == NULL) {
|
|
|
+ return (NULL);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (tok = s; ; ) {
|
|
|
+ c = *s++;
|
|
|
+ spanp = delim;
|
|
|
+ do {
|
|
|
+ if ((sc = *spanp++) == c) {
|
|
|
+ if (c == 0) {
|
|
|
+ s = NULL;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ s[-1] = 0;
|
|
|
+ }
|
|
|
+ *stringp = s;
|
|
|
+ return (tok);
|
|
|
+ }
|
|
|
+ } while (sc != 0);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
static int corosync_main_config_set (
|
|
|
struct objdb_iface_ver0 *objdb,
|
|
|
hdb_handle_t object_handle,
|
|
|
@@ -466,7 +495,7 @@ static int corosync_main_config_set (
|
|
|
goto parse_error;
|
|
|
}
|
|
|
|
|
|
- while ((token = strsep(&temp, "|")) != NULL) {
|
|
|
+ while ((token = strsep_cs(&temp, "|")) != NULL) {
|
|
|
int val;
|
|
|
|
|
|
val = logsys_tag_id_get(token);
|