Sfoglia il codice sorgente

tm: AS - fixed onsend callbacks invocation

When compiled with WITH_AS_SUPPORT and TMCB_ONSEND,
ack_local_uac() used a wrong way for calling the onsend callbacks
(compile error).
Andrei Pelinescu-Onciul 16 anni fa
parent
commit
311d365b18
1 ha cambiato i file con 8 aggiunte e 3 eliminazioni
  1. 8 3
      modules/tm/uac.c

+ 8 - 3
modules/tm/uac.c

@@ -492,6 +492,9 @@ int ack_local_uac(struct cell *trans, str *hdrs, str *body)
 {
 {
 	struct retr_buf *local_ack, *old_lack;
 	struct retr_buf *local_ack, *old_lack;
 	int ret;
 	int ret;
+#ifdef	TMCB_ONSEND
+	struct tmcb_params onsend_params;
+#endif
 
 
 	/* sanity checks */
 	/* sanity checks */
 
 
@@ -553,9 +556,11 @@ int ack_local_uac(struct cell *trans, str *hdrs, str *body)
 	}
 	}
 #ifdef	TMCB_ONSEND
 #ifdef	TMCB_ONSEND
 	else {
 	else {
-		run_onsend_callbacks2(TMCB_REQUEST_SENT, &trans->uac[0]->request, 
-				local_ack->buffer, local_ack->buffer_len, &local_ack->dst,
-				TYPE_LOCAL_ACK);
+		INIT_TMCB_ONSEND_PARAMS(onsend_params, 0, 0, &trans->uac[0].request,
+								&local_ack->dst,
+								local_ack->buffer, local_ack->buffer_len,
+								TMCB_LOCAL_F, 0 /* branch */, TYPE_LOCAL_ACK);
+		run_onsend_callbacks2(TMCB_REQUEST_SENT, trans, &onsend_params);
 	}
 	}
 #endif
 #endif