Ver código fonte

- sctp support

Andrei Pelinescu-Onciul 17 anos atrás
pai
commit
8410d841b0
2 arquivos alterados com 5 adições e 1 exclusões
  1. 3 1
      modules_s/lcr/lcr_mod.c
  2. 2 0
      modules_s/lcr/lcr_rpc.c

+ 3 - 1
modules_s/lcr/lcr_mod.c

@@ -505,7 +505,7 @@ int reload_gws ( void )
 		else {
 			transport = (uri_transport)rec->fld[3].v.int4;
 			if ((transport != PROTO_UDP) && (transport != PROTO_TCP) &&
-				(transport != PROTO_TLS)) {
+				(transport != PROTO_TLS) && (transport != PROTO_SCTP)) {
 				ERR("lcr: Unknown or unsupported transport: %u\n", (unsigned int)transport);
 				goto error;
 			}
@@ -693,6 +693,8 @@ int load_gws(struct sip_msg* _m, char* _s1, char* _s2)
 				memcpy(at, "tcp", 3); at = at + 3;
 			} else if (transport == PROTO_TLS) {
 				memcpy(at, "tls", 3); at = at + 3;
+			} else if (transport == PROTO_SCTP) {
+				memcpy(at, "sctp", 4); at = at + 4;
 			} else {
 				ERR("lcr: Unknown or unsupported transport: %u\n", (unsigned int)transport);
 				continue;

+ 2 - 0
modules_s/lcr/lcr_rpc.c

@@ -87,6 +87,8 @@ static void dump (rpc_t* rpc, void* c)
 			rpc->struct_add(st, "s", "transport", "TCP");
 		} else  if (transport == PROTO_TLS) {
 			rpc->struct_add(st, "s", "transport", "TLS");
+		}else if (transport == PROTO_SCTP) {
+			rpc->struct_add(st, "s", "transport", "SCTP");
 		}
 		if ((*gws)[i].prefix_len) {
 			rpc->struct_add(st, "s", "prefix", (*gws)[i].prefix);