diff options
| author | Damien Laniel <dlaniel@entrouvert.com> | 2007-09-21 16:10:02 +0000 |
|---|---|---|
| committer | Damien Laniel <dlaniel@entrouvert.com> | 2007-09-21 16:10:02 +0000 |
| commit | 2be0a784baabfc70bd1eed54a79e32b3b3cd4610 (patch) | |
| tree | ce7b1dc499225566b2339c34099ba17a471de338 | |
| parent | 34c2bbd70b2dc58b1282c894d826478b0666da6e (diff) | |
| download | lasso-2be0a784baabfc70bd1eed54a79e32b3b3cd4610.tar.gz lasso-2be0a784baabfc70bd1eed54a79e32b3b3cd4610.tar.xz lasso-2be0a784baabfc70bd1eed54a79e32b3b3cd4610.zip | |
fixed service_type in lasso_data_service_process_modify_msg
| -rw-r--r-- | lasso/id-wsf/data_service.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lasso/id-wsf/data_service.c b/lasso/id-wsf/data_service.c index 221e58c7..9fa08a7e 100644 --- a/lasso/id-wsf/data_service.c +++ b/lasso/id-wsf/data_service.c @@ -704,20 +704,19 @@ lasso_data_service_build_modify_response_msg(LassoDataService *service) xmlXPathRegisterNs(xpathCtx, (xmlChar*)response->prefixServiceType, (xmlChar*)response->hrefServiceType); - iter = request->Modification; - while (iter) { + for (iter = request->Modification; iter != NULL; iter = g_list_next(iter)) { LassoDstModification *modification = iter->data; xmlNode *newNode = modification->NewData->any->data; xpathObj = xmlXPathEvalExpression((xmlChar*)modification->Select, xpathCtx); if (xpathObj && xpathObj->nodesetval && xpathObj->nodesetval->nodeNr) { xmlNode *node = xpathObj->nodesetval->nodeTab[0]; - xmlReplaceNode(node, newNode); + if (node != NULL) { + xmlReplaceNode(node, newNode); + } } xmlXPathFreeObject(xpathObj); xpathObj = NULL; - - iter = g_list_next(iter); } xmlXPathFreeContext(xpathCtx); |
