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;
}
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) {
close(skinnysock);
skinnysock = -1;
ast_config_destroy(cfg);
+ ast_mutex_unlock(&netlock);
return 0;
}
if (listen(skinnysock,DEFAULT_SKINNY_BACKLOG)) {
close(skinnysock);
skinnysock = -1;
ast_config_destroy(cfg);
+ ast_mutex_unlock(&netlock);
return 0;
}
if (option_verbose > 1)