Переглянути джерело

modules_k/xcap_server: Fixed a segmentation fault in xcap_server

- This occurs when you try to modify (with xpath) an XML document
  that does not exist on the server.
Peter Dunkley 13 роки тому
батько
коміт
a31826badd
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      modules_k/xcap_server/xcap_server.c

+ 2 - 2
modules_k/xcap_server/xcap_server.c

@@ -576,7 +576,7 @@ static int w_xcaps_put(sip_msg_t* msg, char* puri, char* ppath,
 		/* partial document upload
 		 *   - fetch, update, delete and store
 		 */
-		if(xcaps_get_db_doc(&turi.user, &turi.host, &xuri, &tbuf)<0)
+		if(xcaps_get_db_doc(&turi.user, &turi.host, &xuri, &tbuf) != 0)
 		{
 			LM_ERR("could not fetch xcap document\n");
 			goto error;
@@ -1092,7 +1092,7 @@ static int w_xcaps_del(sip_msg_t* msg, char* puri, char* ppath)
 				&xcaps_str_empty, &xcaps_str_empty);
 	} else {
 		/* delete element */
-		if(xcaps_get_db_doc(&turi.user, &turi.host, &xuri, &tbuf)<0)
+		if(xcaps_get_db_doc(&turi.user, &turi.host, &xuri, &tbuf) != 0)
 		{
 			LM_ERR("could not fetch xcap document\n");
 			goto error;