Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,8 @@ abyss_bool handler_hook(TSession * r)
return FALSE;
}

switch_mutex_unlock(globals.mutex);

/* Default to 500 status to avoid assert. It should be
overridden later if we actually handle it or if the
default handler in abyss handles it. */
Expand All @@ -882,7 +884,6 @@ abyss_bool handler_hook(TSession * r)
command += 8;
xml++;
} else {
switch_mutex_unlock(globals.mutex);
return FALSE; /* 404 */
}

Expand Down Expand Up @@ -1045,7 +1046,6 @@ abyss_bool handler_hook(TSession * r)

/* We made it this far, always OK */
if (!HTTPWrite(r, "HTTP/1.1 200 OK\r\n", (uint32_t) strlen("HTTP/1.1 200 OK\r\n"))) {
switch_mutex_unlock(globals.mutex);
return TRUE;
}

Expand Down Expand Up @@ -1083,7 +1083,6 @@ abyss_bool handler_hook(TSession * r)
char *header = switch_mprintf("%s: %s\r\n", ti->name, ti->value);
if (!ConnWrite(r->connP, header, (uint32_t) strlen(header))) {
switch_safe_free(header);
switch_mutex_unlock(globals.mutex);
return TRUE;
}
switch_safe_free(header);
Expand All @@ -1092,7 +1091,6 @@ abyss_bool handler_hook(TSession * r)
/* send end http header */
if (html||text||xml) {
if (!ConnWrite(r->connP, CRLF, 2)) {
switch_mutex_unlock(globals.mutex);
return TRUE;
}
}
Expand Down Expand Up @@ -1137,7 +1135,6 @@ abyss_bool handler_hook(TSession * r)
r->requestInfo.keepalive = 0;

end:
switch_mutex_unlock(globals.mutex);
return ret;
}

Expand Down
Loading