summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2011-02-20 01:24:29 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2011-02-20 01:24:29 +0000
commitc9fb67c634b16d4261349faed8797ceda7c52b23 (patch)
treec8c6b94d7fa9b57b5ff6823366de2afbd29025d7
parent9acf199fb8a77aed22df843f0e1193953d2893cd (diff)
downloadandroid_hardware_qcom_gps-c9fb67c634b16d4261349faed8797ceda7c52b23.tar.gz
android_hardware_qcom_gps-c9fb67c634b16d4261349faed8797ceda7c52b23.tar.bz2
android_hardware_qcom_gps-c9fb67c634b16d4261349faed8797ceda7c52b23.zip
Destroy client handles after they're closed
Make sure the connection to the RPC service is shutdown and cleaned up when loc_close() is invoked. Change-Id: I4f8b4d0aa3c2ff9ca5baf4ac07d31aa2e77d6721
-rwxr-xr-xloc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c5
-rwxr-xr-xloc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c
index fbaca8b..ec040d7 100755
--- a/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c
+++ b/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c
@@ -218,6 +218,11 @@ int32 loc_close(rpc_loc_client_handle_type handle)
stat = RPC_FUNC_VERSION(rpc_loc_close_, /* LOC_APIVERS */ 0x00040001)(&args, &rets, loc_api_clnt);
LOC_GLUE_CHECK_RESULT(stat, int32);
+ if (loc_api_clnt != NULL)
+ clnt_destroy(loc_api_clnt);
+
+ loc_api_clnt = NULL;
+
return (int32) rets.loc_close_result;
}
diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c
index 8c17122..a2bf245 100755
--- a/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c
+++ b/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c
@@ -218,6 +218,11 @@ int32 loc_close(rpc_loc_client_handle_type handle)
stat = RPC_FUNC_VERSION(rpc_loc_close_, LOC_APIVERS)(&args, &rets, loc_api_clnt);
LOC_GLUE_CHECK_RESULT(stat, int32);
+ if (loc_api_clnt != NULL)
+ clnt_destroy(loc_api_clnt);
+
+ loc_api_clnt = NULL;
+
return (int32) rets.loc_close_result;
}