Skip to content

Commit 72ff314

Browse files
committed
Remove global proto
1 parent 0d40dc9 commit 72ff314

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

ip_addr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
enum sip_protos { PROTO_NONE = 0, PROTO_FIRST = 1, PROTO_UDP = 1, \
5959
PROTO_TCP, PROTO_TLS, PROTO_SCTP, PROTO_WS, PROTO_WSS, PROTO_IPSEC, PROTO_BIN,
6060
PROTO_BINS, PROTO_HEP_UDP, PROTO_HEP_TCP, PROTO_HEP_TLS, PROTO_SMPP, PROTO_MSRP,
61-
PROTO_MSRPS, PROTO_JANUSWS, PROTO_JANUSWSS, PROTO_OTHER };
61+
PROTO_MSRPS, PROTO_OTHER };
6262
#define PROTO_LAST PROTO_OTHER
6363

6464
struct ip_addr{

modules/janus/janus_parser.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ char * parse_janus_url(char *start,char *end,struct janus_url *url)
5959
goto error;
6060
url->whole.s = p;
6161
if (memcmp(p,"janusws",7) == 0) {
62-
url->proto = PROTO_JANUSWS;
62+
url->proto = JANUS_WS_PROTO;
6363
p+=7;
6464
} else if (memcmp(p,"januswss",7) == 0) {
65-
url->proto = PROTO_JANUSWSS;
65+
/* FIXME - this is not currently supported */
66+
url->proto = JANUS_WSS_PROTO;
6667
p+=8;
6768
}
6869
LM_DBG("At %c \n",*p);

modules/janus/janus_parser.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@
3535
* janus : ack & janus : event are ways of signaling a reply */
3636
enum janus_msg_type { JANUS_UNKNOWN=0, JANUS_REQUEST=1, JANUS_REPLY=2};
3737

38+
enum janus_proto { JANUS_WS_PROTO=0, JANUS_WSS_PROTO=1 };
39+
3840
struct janus_url {
3941
str whole;
40-
int proto;
42+
enum janus_proto proto;
4143
unsigned short port_no;
4244
str host;
4345
str port;

0 commit comments

Comments
 (0)