2
0
Эх сурвалжийг харах

pdb: check the result of setting the timeout via rpc

Daniel-Constantin Mierla 2 сар өмнө
parent
commit
5a74654e0b

+ 4 - 1
src/modules/pdb/pdb.c

@@ -787,7 +787,10 @@ static void pdb_rpc_timeout(rpc_t *rpc, void *ctx)
 		return;
 		return;
 	}
 	}
 
 
-	cfg_set_now_int(ctx, &gname, NULL, &vname, new_val);
+	if(cfg_set_now_int(ctx, &gname, NULL, &vname, new_val)) {
+		rpc->fault(ctx, 500, "Failed to set the new value");
+		return;
+	}
 }
 }
 
 
 static void pdb_rpc_activate(rpc_t *rpc, void *ctx)
 static void pdb_rpc_activate(rpc_t *rpc, void *ctx)