Changeset 5687:2462b285607d in roaraudio
- Timestamp:
- 10/05/12 13:43:51 (12 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r5686 r5687 8 8 * Install parts from build system (Closes: #325) 9 9 * Re-ported to win32 (Closes: #330, #331) 10 * Fixed segfault caused by strstr() in low level socket interface. 10 11 11 12 v. 1.0beta6 - Fri Sep 21 2012 18:03 CEST -
libroar/socket.c
r5619 r5687 601 601 if ( type == ROAR_SOCKET_TYPE_DECNET ) { 602 602 #ifdef ROAR_HAVE_LIBDNET 603 ROAR_DBG("roar_socket_open(*): hostname for DECnet: host(%p)=%s", host, host); 603 ROAR_DBG("roar_socket_open(*): nodename for DECnet: host(%p)=%s", host, host); 604 dnet_node_buf = roar_mm_strdup(host); 605 // roar_error is still set. 606 if ( dnet_node_buf == NULL ) 607 return -1; 608 609 host = dnet_node_buf; 610 604 611 del = strstr(host, "::"); 605 ROAR_DBG("roar_socket_open(*): hostname for DECnet: del(%p)=%s", del, del);612 ROAR_DBG("roar_socket_open(*): nodename for DECnet: del(%p)=%s", del, del); 606 613 607 614 if ( del == NULL ) { 608 ROAR_WARN("roar_socket_open(*): invalid hostname for DECnet: %s", host); 615 ROAR_WARN("roar_socket_open(*): invalid nodename for DECnet: %s", host); 616 roar_mm_free(dnet_node_buf); 609 617 roar_err_set(ROAR_ERROR_INVAL); 610 618 return -1; … … 628 636 if ( mode == MODE_LISTEN ) { 629 637 fh = roar_socket_listen_decnet(obj, port); 630 *del = ':';638 roar_mm_free(dnet_node_buf); 631 639 return fh; 632 640 } else { 633 641 // There is nothing wrong in this case to use dnet_conn() so we do. 634 dnet_node_buf = roar_mm_strdup(host);635 if ( dnet_node_buf == NULL ) {636 *del = ':';637 return -1;638 }639 642 ROAR_DBG("roar_socket_open(*): CALL dnet_conn('%s', '%s', SOCK_STREAM, 0 ,0 ,0 , 0)", dnet_node_buf, obj); 640 643 fh = dnet_conn(dnet_node_buf, obj, SOCK_STREAM, 0, 0, 0, 0); 641 644 ROAR_DBG("roar_socket_open(*): RET %i", fh); 642 645 roar_mm_free(dnet_node_buf); 643 *del = ':';644 646 return fh; 645 647 }
Note: See TracChangeset
for help on using the changeset viewer.