[sr-dev] git:master:3cbae684: usrloc: rpc flush to return error in case of failure

Daniel-Constantin Mierla miconda at gmail.com
Sat Jul 8 09:48:52 CEST 2017


Module: kamailio
Branch: master
Commit: 3cbae6841c80de89fc7c72b73c1695e3788c1819
URL: https://github.com/kamailio/kamailio/commit/3cbae6841c80de89fc7c72b73c1695e3788c1819

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-07-08T09:48:35+02:00

usrloc: rpc flush to return error in case of failure

---

Modified: src/modules/usrloc/ul_rpc.c

---

Diff:  https://github.com/kamailio/kamailio/commit/3cbae6841c80de89fc7c72b73c1695e3788c1819.diff
Patch: https://github.com/kamailio/kamailio/commit/3cbae6841c80de89fc7c72b73c1695e3788c1819.patch

---

diff --git a/src/modules/usrloc/ul_rpc.c b/src/modules/usrloc/ul_rpc.c
index 35f78e95e2..bace4885e1 100644
--- a/src/modules/usrloc/ul_rpc.c
+++ b/src/modules/usrloc/ul_rpc.c
@@ -545,7 +545,9 @@ static const char* ul_rpc_rm_contact_doc[2] = {
 
 static void ul_rpc_flush(rpc_t* rpc, void* ctx)
 {
-	synchronize_all_udomains(0, 1);
+	if(synchronize_all_udomains(0, 1) != 0) {
+		rpc->fault(ctx, 500, "Operation failed");
+	}
 	return;
 }
 




More information about the sr-dev mailing list