Skip to content

Commit 9bc3078

Browse files
committed
Modidied Test channel output to not cast a pointer to an int. ALso added some info on the channel in same output. Stops Issue #6
1 parent 535d848 commit 9bc3078

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ EXECUTABLE=sipcmd
1010
DEBUG=-g -DDEBUG
1111

1212
all: $(SOURCES) $(EXECUTABLE)
13-
13+
1414
$(EXECUTABLE): $(OBJECTS)
1515
$(CC) $(OBJECTS) -o $@ $(LIBS)
1616

src/channels.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ void TestChanAudio::RecordFromBuffer(
334334
}
335335

336336
bool TestChannel::Close() {
337-
cout << __func__ << " [" << (unsigned int)this << "]" << endl;
337+
cout << __func__ << " [ " << this->connection
338+
<< " - " << this << " ]" << endl;
338339
audiohandle.CloseChannel();
339340
return true;
340341
}

src/channels.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ class TestChannel : public PIndirectChannel
108108
TestChannel(OpalConnection &conn, TestChanAudio &chan) :
109109
connection(conn), audiohandle(chan), is_open(false),
110110
readDelay(), writeDelay() {
111-
std::cout << __func__ << "[" <<
112-
(unsigned int)this << "]" << std::endl;
111+
std::cout << __func__ << "[ " <<
112+
this->connection << " - " << this << " ]" << std::endl;
113113
}
114114

115115
~TestChannel() {
116-
std::cout << __func__ << "[" << (unsigned int)this
117-
<< "]" << std::endl;
116+
std::cout << __func__ << "[ " << this->connection
117+
<< " - " << this << " ]" << std::endl;
118118
Close();
119119
}
120120

0 commit comments

Comments
 (0)