... | ... |
@@ -13,6 +13,8 @@ |
13 | 13 |
#include "udp_server.h" |
14 | 14 |
#include "route.h" |
15 | 15 |
|
16 |
+#include <sys/types.h> |
|
17 |
+#include <sys/socket.h> |
|
16 | 18 |
#include <netdb.h> |
17 | 19 |
#include <stdlib.h> |
18 | 20 |
|
... | ... |
@@ -41,7 +43,7 @@ int do_action(struct action* a, struct sip_msg* msg) |
41 | 43 |
if (ret>=0) ret=1; |
42 | 44 |
break; |
43 | 45 |
case SEND_T: |
44 |
- to=(struct sockaddr_in*) malloc(sizeof(struct sockaddr)); |
|
46 |
+ to=(struct sockaddr_in*) malloc(sizeof(struct sockaddr_in)); |
|
45 | 47 |
if (to==0){ |
46 | 48 |
LOG(L_ERR, "ERROR: do_action: " |
47 | 49 |
"memory allocation failure\n"); |