diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index c7d2c9b1ef89a4163cd50f7c58da9c9be2904128..db95ce8ef3b66d3ccba698a17be4721fcb64e7c8 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -1839,6 +1839,7 @@ static int transmit_response(struct skinnysession *s, struct skinny_req *req) if (letohl(req->len > SKINNY_MAX_PACKET) || letohl(req->len < 0)) { ast_log(LOG_WARNING, "transmit_response: the length of the request is out of bounds\n"); + ast_mutex_unlock(&s->lock); return -1; } @@ -2872,7 +2873,7 @@ static char *handle_skinny_show_lines(struct ast_cli_entry *e, int cmd, struct a l->label); } } - AST_LIST_LOCK(&devices); + AST_LIST_UNLOCK(&devices); return CLI_SUCCESS; } @@ -6274,6 +6275,7 @@ static int reload_config(void) if(setsockopt(skinnysock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) { ast_log(LOG_ERROR, "Set Socket Options failed: errno %d, %s\n", errno, strerror(errno)); ast_config_destroy(cfg); + ast_mutex_unlock(&netlock); return 0; } if (skinnysock < 0) { @@ -6286,6 +6288,7 @@ static int reload_config(void) close(skinnysock); skinnysock = -1; ast_config_destroy(cfg); + ast_mutex_unlock(&netlock); return 0; } if (listen(skinnysock,DEFAULT_SKINNY_BACKLOG)) { @@ -6295,6 +6298,7 @@ static int reload_config(void) close(skinnysock); skinnysock = -1; ast_config_destroy(cfg); + ast_mutex_unlock(&netlock); return 0; } ast_verb(2, "Skinny listening on %s:%d\n",