Skip to content

Commit 45e305b

Browse files
committed
Fixes for sip_client new 0.3 API
1 parent 3dd3fd2 commit 45e305b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/sip_client/sip_client.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ client sip_client;
2323

2424
bool received;
2525

26-
void on_open(websocketpp::connection_hdl hdl) {
26+
void on_open(client* c, websocketpp::connection_hdl hdl) {
2727
// now it is safe to use the connection
2828
std::cout << "connection ready" << std::endl;
2929

@@ -33,7 +33,7 @@ void on_open(websocketpp::connection_hdl hdl) {
3333
sip_client.send(hdl, SIP_msg.c_str(), websocketpp::frame::opcode::text);
3434
}
3535

36-
void on_message(websocketpp::connection_hdl hdl, message_ptr msg) {
36+
void on_message(client* c, websocketpp::connection_hdl hdl, message_ptr msg) {
3737
client::connection_ptr con = sip_client.get_con_from_hdl(hdl);
3838

3939
std::cout << "Received a reply:" << std::endl;
@@ -65,7 +65,7 @@ int main(int argc, char* argv[]) {
6565
client::connection_ptr con = sip_client.get_connection(uri, ec);
6666

6767
// Specify the SIP subprotocol:
68-
con.add_subprotocol("sip");
68+
con->add_subprotocol("sip");
6969

7070
sip_client.connect(con);
7171

0 commit comments

Comments
 (0)