Skip to content

Commit

Permalink
mi_datagram: Send error response on out-of-memory
Browse files Browse the repository at this point in the history
(cherry picked from commit 902a77a)
  • Loading branch information
gaaf committed Nov 10, 2014
1 parent 293d7cb commit 9cc499e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/mi_datagram/datagram_fnc.c
Expand Up @@ -533,7 +533,10 @@ void mi_datagram_server(int rx_sock, int tx_sock)

if (mi_rpl!=MI_ROOT_ASYNC_RPL) {
if(mi_datagram_write_tree(&dtgram , mi_rpl) != 0){
LM_ERR("failed to build the response \n");
mi_send_dgram(tx_sock, MI_INTERNAL_ERROR, MI_INTERNAL_ERROR_LEN,
(struct sockaddr* )&reply_addr, reply_addr_len,
mi_socket_timeout);
LM_ERR("failed to build the response \n");
goto failure;
}

Expand Down

0 comments on commit 9cc499e

Please sign in to comment.