summaryrefslogtreecommitdiffstats
path: root/src/input/hsl.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso2011-07-07 17:47:26 +0200
committerPablo Neira Ayuso2011-07-07 19:33:24 +0200
commit3832c4f908e6d9d821b18bbccab017b2d3d6c79c (patch)
tree0fb3bc3956cde0c85db98671146cb503c86a138b /src/input/hsl.c
parentipaccess: close connection if we receive bad messages from BTS (diff)
downloadlibosmo-abis-3832c4f908e6d9d821b18bbccab017b2d3d6c79c.tar.gz
libosmo-abis-3832c4f908e6d9d821b18bbccab017b2d3d6c79c.tar.xz
libosmo-abis-3832c4f908e6d9d821b18bbccab017b2d3d6c79c.zip
e1_input: add new refcounting scheme to avoid leaking E1 lines
This patch 's/e1inp_line_get/e1inp_line_find/g' since we need this function name for the new refcounting scheme. Basically, I have added a new function to clone lines that is used by the ipaccess driver: struct e1inp_line *e1inp_line_clone(void *ctx, struct e1inp_line *line); And two functions to bump and decrement the refcount: void e1inp_line_get(struct e1inp_line *line); void e1inp_line_put(struct e1inp_line *line); This is useful to avoid leaking virtual E1 lines in the ipaccess case, since we have two sockets for OML and RSL respectively, we have to release the line *once* both sockets have been closed. Without this patch, there are cases in which we don't know if it's time to release the virtual E1 line. This patch also includes a fix to avoid crashing if we open a connection with OML/RSL port without sending any ID_RESP message (in that case, we have no chance to set the signal link). I tested these situations with netcat.
Diffstat (limited to 'src/input/hsl.c')
0 files changed, 0 insertions, 0 deletions