This commit is contained in:
parent
f5396bdfce
commit
63a4e79b51
@ -162,6 +162,7 @@ int PLUGIN_END(plugin_def_t *plugin_def){
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/* private plugin code */
|
||||
static int plugin_defaulttarget_redirect(sip_ticket_t *ticket) {
|
||||
int i;
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
@ -354,6 +355,7 @@ int main (int argc, char *argv[])
|
||||
*****************************/
|
||||
while (!exit_program) {
|
||||
|
||||
memset(&ticket, 0, sizeof(sip_ticket_t));
|
||||
while ((sts = sipsock_waitfordata(buff, sizeof(buff)-1,
|
||||
&ticket.from, &ticket.protocol)) <=0 ) {
|
||||
|
||||
@ -392,6 +394,7 @@ int main (int argc, char *argv[])
|
||||
buflen = (size_t)sts;
|
||||
DEBUGC(DBCLASS_BABBLE,"received %zd bytes of data", buflen);
|
||||
ticket.direction=0;
|
||||
ticket.timestamp=time(NULL);
|
||||
memset(&ticket.next_hop, 0, sizeof(ticket.next_hop));
|
||||
buff[buflen]='\0';
|
||||
|
||||
|
||||
@ -125,9 +125,10 @@ typedef struct {
|
||||
*/
|
||||
typedef struct {
|
||||
char *raw_buffer; /* raw UDP packet */
|
||||
size_t raw_buffer_len; /* length of raw data */
|
||||
size_t raw_buffer_len; /* length of raw data */
|
||||
osip_message_t *sipmsg; /* SIP */
|
||||
struct sockaddr_in from; /* received from */
|
||||
time_t timestamp; /* timestamp of reception */
|
||||
#define PROTO_UNKN -1
|
||||
#define PROTO_UDP 1
|
||||
#define PROTO_TCP 2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user