Changeset 272 for branches/samba-3.2.x/source/utils/net_rpc.c
- Timestamp:
- Jun 16, 2009, 5:52:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/utils/net_rpc.c
r235 r272 119 119 DOM_SID *domain_sid; 120 120 const char *domain_name; 121 int ret = -1; 121 122 122 123 /* make use of cli_state handed over as an argument, if possible */ … … 140 141 if (!(mem_ctx = talloc_init("run_rpc_command"))) { 141 142 DEBUG(0, ("talloc_init() failed\n")); 142 cli_shutdown(cli); 143 return -1; 143 goto fail; 144 144 } 145 145 … … 147 147 &domain_name); 148 148 if (!NT_STATUS_IS_OK(nt_status)) { 149 cli_shutdown(cli); 150 return -1; 149 goto fail; 151 150 } 152 151 … … 161 160 DEBUG(0, ("Could not initialise schannel netlogon pipe. Error was %s\n", 162 161 nt_errstr(nt_status) )); 163 cli_shutdown(cli); 164 return -1; 162 goto fail; 165 163 } 166 164 } else { … … 170 168 cli_get_pipe_name(pipe_idx), 171 169 nt_errstr(nt_status) )); 172 cli_shutdown(cli); 173 return -1; 170 goto fail; 174 171 } 175 172 } … … 181 178 DEBUG(1, ("rpc command function failed! (%s)\n", nt_errstr(nt_status))); 182 179 } else { 180 ret = 0; 183 181 DEBUG(5, ("rpc command function succedded\n")); 184 182 } … … 190 188 } 191 189 190 fail: 192 191 /* close the connection only if it was opened here */ 193 192 if (!cli_arg) { … … 196 195 197 196 talloc_destroy(mem_ctx); 198 return (!NT_STATUS_IS_OK(nt_status));197 return ret; 199 198 } 200 199
Note:
See TracChangeset
for help on using the changeset viewer.