369 break; |
370 break; |
370 } |
371 } |
371 |
372 |
372 // no more data - break |
373 // no more data - break |
373 if (input.length == 0) { |
374 if (input.length == 0) { |
374 status = found ? CX_PROPERTIES_NO_ERROR : CX_PROPERTIES_NO_DATA; |
375 if (found) { |
|
376 // something was found, check the last kv_status |
|
377 if (kv_status == CX_PROPERTIES_INCOMPLETE_DATA) { |
|
378 status = CX_PROPERTIES_INCOMPLETE_DATA; |
|
379 } else { |
|
380 status = CX_PROPERTIES_NO_ERROR; |
|
381 } |
|
382 } else { |
|
383 // nothing found |
|
384 status = CX_PROPERTIES_NO_DATA; |
|
385 } |
375 break; |
386 break; |
376 } |
387 } |
377 |
388 |
378 // set the input buffer and read the k/v-pairs |
389 // set the input buffer and read the k/v-pairs |
379 cxPropertiesFill(prop, input); |
390 cxPropertiesFill(prop, input); |
380 |
391 |
381 CxPropertiesStatus kv_status; |
|
382 do { |
392 do { |
383 cxstring key, value; |
393 cxstring key, value; |
384 kv_status = cxPropertiesNext(prop, &key, &value); |
394 kv_status = cxPropertiesNext(prop, &key, &value); |
385 if (kv_status == CX_PROPERTIES_NO_ERROR) { |
395 if (kv_status == CX_PROPERTIES_NO_ERROR) { |
386 found = true; |
396 found = true; |