- if (strcasecmp(tt,"client") == 0) {
- dle->estimate = ES_CLIENT;
- } else if (strcasecmp(tt,"calcsize") == 0) {
- dle->estimate = ES_CALCSIZE;
- dle->calcsize = 1;
- } else if (strcasecmp(tt,"server") == 0) {
- dle->estimate = ES_SERVER;
+ char *ttt = tt;
+ while (strlen(ttt) > 0) {
+ if (BSTRNCMP(ttt,"CLIENT") == 0) {
+ dle->estimatelist = g_slist_append(dle->estimatelist,
+ GINT_TO_POINTER(ES_CLIENT));
+ ttt += strlen("client");
+ } else if (BSTRNCMP(ttt,"CALCSIZE") == 0) {
+ if (!data_user->has_calcsize)
+ dle->estimatelist = g_slist_append(dle->estimatelist,
+ GINT_TO_POINTER(ES_CALCSIZE));
+ ttt += strlen("calcsize");
+ } else if (BSTRNCMP(ttt,"SERVER") == 0) {
+ dle->estimatelist = g_slist_append(dle->estimatelist,
+ GINT_TO_POINTER(ES_SERVER));
+ ttt += strlen("server");
+ } else {
+ g_set_error(gerror, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
+ "XML: bad estimate: %s", tt);
+ return;
+ }
+ while (*ttt == ' ')
+ ttt++;