Skip to content

Commit

Permalink
Remove global proto
Browse files Browse the repository at this point in the history
  • Loading branch information
vladpaiu committed Dec 11, 2024
1 parent 0d40dc9 commit 72ff314
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ip_addr.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
enum sip_protos { PROTO_NONE = 0, PROTO_FIRST = 1, PROTO_UDP = 1, \
PROTO_TCP, PROTO_TLS, PROTO_SCTP, PROTO_WS, PROTO_WSS, PROTO_IPSEC, PROTO_BIN,
PROTO_BINS, PROTO_HEP_UDP, PROTO_HEP_TCP, PROTO_HEP_TLS, PROTO_SMPP, PROTO_MSRP,
PROTO_MSRPS, PROTO_JANUSWS, PROTO_JANUSWSS, PROTO_OTHER };
PROTO_MSRPS, PROTO_OTHER };
#define PROTO_LAST PROTO_OTHER

struct ip_addr{
Expand Down
5 changes: 3 additions & 2 deletions modules/janus/janus_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ char * parse_janus_url(char *start,char *end,struct janus_url *url)
goto error;
url->whole.s = p;
if (memcmp(p,"janusws",7) == 0) {
url->proto = PROTO_JANUSWS;
url->proto = JANUS_WS_PROTO;
p+=7;
} else if (memcmp(p,"januswss",7) == 0) {
url->proto = PROTO_JANUSWSS;
/* FIXME - this is not currently supported */
url->proto = JANUS_WSS_PROTO;
p+=8;
}
LM_DBG("At %c \n",*p);
Expand Down
4 changes: 3 additions & 1 deletion modules/janus/janus_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
* janus : ack & janus : event are ways of signaling a reply */
enum janus_msg_type { JANUS_UNKNOWN=0, JANUS_REQUEST=1, JANUS_REPLY=2};

enum janus_proto { JANUS_WS_PROTO=0, JANUS_WSS_PROTO=1 };

struct janus_url {
str whole;
int proto;
enum janus_proto proto;
unsigned short port_no;
str host;
str port;
Expand Down

0 comments on commit 72ff314

Please sign in to comment.