Module: kamailio
Branch: master
Commit: cc34d05b8371c57cdcfe468fdba036d2b710dbb5
URL:
https://github.com/kamailio/kamailio/commit/cc34d05b8371c57cdcfe468fdba036d…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-23T12:06:58+01:00
seas: use new introduced buf_print_ip to print IP addresses instead of own implemenation
---
Modified: src/modules/seas/event_dispatcher.c
Modified: src/modules/seas/seas.h
---
Diff:
https://github.com/kamailio/kamailio/commit/cc34d05b8371c57cdcfe468fdba036d…
Patch:
https://github.com/kamailio/kamailio/commit/cc34d05b8371c57cdcfe468fdba036d…
---
diff --git a/src/modules/seas/event_dispatcher.c b/src/modules/seas/event_dispatcher.c
index 86f1b0d722..6031310aa1 100644
--- a/src/modules/seas/event_dispatcher.c
+++ b/src/modules/seas/event_dispatcher.c
@@ -850,7 +850,7 @@ int process_bind_action(as_p as,unsigned char processor_id,unsigned
int flags,ch
memcpy(&port,payload+k,2);
k+=2;
port=ntohs(port);
- print_ip_buf(&my_addr,buffer,300);
+ buf_print_ip(buffer, &my_addr,300);
switch(proto){
case PROTO_UDP:
proto_s="UDP";
diff --git a/src/modules/seas/seas.h b/src/modules/seas/seas.h
index 9f525f48c4..3244cc9692 100644
--- a/src/modules/seas/seas.h
+++ b/src/modules/seas/seas.h
@@ -159,19 +159,4 @@ void seas_sighandler(int signo);
char* create_as_event_t(struct cell *t,struct sip_msg *msg,char processor_id,int
*evt_len,int flags);
char* create_as_event_sl(struct sip_msg *msg,char processor_id,int *evt_len,int flags);
-static inline void print_ip_buf(struct ip_addr* ip, char *where,int len)
-{
- switch(ip->af){
- case AF_INET:
- snprintf(where,len,"%d.%d.%d.%d", ip->u.addr[0], ip->u.addr[1],
ip->u.addr[2], ip->u.addr[3]);
- break;
- case AF_INET6:
- snprintf(where,len,"%x:%x:%x:%x:%x:%x:%x:%x",htons(ip->u.addr16[0]),htons(ip->u.addr16[1]),htons(ip->u.addr16[2]),
- htons(ip->u.addr16[3]), htons(ip->u.addr16[4]), htons(ip->u.addr16[5]),
htons(ip->u.addr16[6]),
- htons(ip->u.addr16[7]));
- break;
- default:
- break;
- }
-}
#endif