@@ -281,18 +281,17 @@ extern "C" int ndb_mgm_set_connectstring(NdbMgmHandle handle,
281
281
extern " C" int ndb_mgm_set_bindaddress (NdbMgmHandle handle, const char *arg) {
282
282
DBUG_ENTER (" ndb_mgm_set_bindaddress" );
283
283
free (handle->m_bindaddress );
284
+ handle->m_bindaddress = nullptr ;
285
+ handle->m_bindaddress_port = 0 ;
284
286
285
287
if (arg) {
286
288
char hostbuf[NI_MAXHOST];
287
289
char servbuf[NI_MAXSERV];
288
290
if (Ndb_split_string_address_port (arg, hostbuf, sizeof (hostbuf), servbuf,
289
291
sizeof (servbuf)) == 0 ) {
290
292
char *endp = nullptr ;
291
- errno = 0 ;
292
293
long val = strtol (servbuf, &endp, 10 );
293
-
294
- if ((errno == ERANGE && (val == LONG_MAX || val == LONG_MIN)) ||
295
- (errno != 0 ) || (*endp != ' \0 ' ) || (val > UINT16_MAX) || (val < 0 )) {
294
+ if (*endp != ' \0 ' || val > UINT16_MAX || val < 0 ) {
296
295
// invalid address
297
296
SET_ERROR (handle, NDB_MGM_ILLEGAL_BIND_ADDRESS, " Illegal bind address" );
298
297
DBUG_RETURN (-1 );
@@ -305,9 +304,6 @@ extern "C" int ndb_mgm_set_bindaddress(NdbMgmHandle handle, const char *arg) {
305
304
SET_ERROR (handle, NDB_MGM_ILLEGAL_BIND_ADDRESS, " Illegal bind address" );
306
305
DBUG_RETURN (-1 );
307
306
}
308
- } else {
309
- handle->m_bindaddress = nullptr ;
310
- handle->m_bindaddress_port = 0 ;
311
307
}
312
308
if (handle->cfg .ids .size () != 0 ) {
313
309
handle->cfg .bind_address_port = handle->m_bindaddress_port ;
@@ -428,11 +424,11 @@ static const Properties *handle_authorization_failure(NdbMgmHandle handle,
428
424
ndb_mgmd.
429
425
Read and return result
430
426
431
- @param The mgmapi handle
432
- @param List describing the expected reply
433
- @param Name of the command to call
434
- @param Arguments for the command
435
- @param Any bulk data to send after the command
427
+ @param handle The mgmapi handle
428
+ @param command_reply List describing the expected reply
429
+ @param cmd Name of the command to call
430
+ @param cmd_args Arguments for the command
431
+ @param cmd_bulk Any bulk data to send after the command
436
432
437
433
*/
438
434
static const Properties *ndb_mgm_call (
0 commit comments