Procházet zdrojové kódy

mi_datagram: Send error response on out-of-memory

Alex Hermann před 11 roky
rodič
revize
902a77af15
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      modules/mi_datagram/datagram_fnc.c

+ 4 - 1
modules/mi_datagram/datagram_fnc.c

@@ -533,7 +533,10 @@ void mi_datagram_server(int rx_sock, int tx_sock)
 
 
 		if (mi_rpl!=MI_ROOT_ASYNC_RPL) {
 		if (mi_rpl!=MI_ROOT_ASYNC_RPL) {
 			if(mi_datagram_write_tree(&dtgram , mi_rpl) != 0){
 			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;
 				goto failure;
 			}
 			}