Sfoglia il codice sorgente

msilo(k): set tm callback type for sent messages

- it must be TMCB_LOCAL_COMPLETED
- otherwise the callback is not executed when transaction completes
- delivered messages were not deleted from db
- reported by Juha Heinanen
(cherry picked from commit d8dde2fe2e7004c69a6241a054c5febe73548267)
Daniel-Constantin Mierla 16 anni fa
parent
commit
2e148da518
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      modules_k/msilo/msilo.c

+ 2 - 0
modules_k/msilo/msilo.c

@@ -1060,6 +1060,7 @@ static int m_dump(struct sip_msg* msg, char* owner, char* str2)
 		uac_r.method = &msg_type;
 		uac_r.headers = &hdr_str;
 		uac_r.body = (n<0)?&str_vals[2]:&body_str;
+		uac_r.cb_flags = TMCB_LOCAL_COMPLETED;
 		uac_r.cb  = m_tm_callback;
 		uac_r.cbp = (void*)(long)mid;
 
@@ -1333,6 +1334,7 @@ void m_send_ontimer(unsigned int ticks, void *param)
 		uac_r.method  = &msg_type;
 		uac_r.headers = &hdr_str;
 		uac_r.body = (n<0)?&str_vals[2]:&body_str;
+		uac_r.cb_flags = TMCB_LOCAL_COMPLETED;
 		uac_r.cb  = m_tm_callback;
 		uac_r.cbp = (void*)(long)mid;
 		tmb.t_request(&uac_r,  /* UAC Req */