Code Review
/
ric-plt
/
lib
/
rmr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fix(routes): Allow RTS without specific rt entry
[ric-plt/lib/rmr.git]
/
src
/
nanomsg
/
src
/
rtable_static.c
diff --git
a/src/nanomsg/src/rtable_static.c
b/src/nanomsg/src/rtable_static.c
index
2233da4
..
41ebc61
100644
(file)
--- a/
src/nanomsg/src/rtable_static.c
+++ b/
src/nanomsg/src/rtable_static.c
@@
-172,7
+172,9
@@
static int uta_epsock_byname( route_table_t* rt, char* ep_name ) {
ep = rmr_sym_get( rt->hash, ep_name, 1 );
if( ep == NULL ) {
ep = rmr_sym_get( rt->hash, ep_name, 1 );
if( ep == NULL ) {
- return -1;
+ if( ! ep_name || (ep = rt_ensure_ep( rt, ep_name)) == NULL ) { // create one if not in rt (support rts without entry in our table)
+ return -1;
+ }
}
if( !ep->open ) { // not connected; must connect now
}
if( !ep->open ) { // not connected; must connect now