streamts: fix 32<->64bit format strings

This commit is contained in:
Stefan Seyfried
2012-11-11 01:47:40 +01:00
parent c480e36746
commit 987ba44d64

View File

@@ -72,7 +72,7 @@
CStreamInstance::CStreamInstance(int clientfd, t_channel_id chid, stream_pids_t &_pids) CStreamInstance::CStreamInstance(int clientfd, t_channel_id chid, stream_pids_t &_pids)
{ {
printf("CStreamInstance:: new channel %llx fd %d\n", chid, clientfd); printf("CStreamInstance:: new channel %" PRIx64 " fd %d\n", chid, clientfd);
fds.insert(clientfd); fds.insert(clientfd);
pids = _pids; pids = _pids;
channel_id = chid; channel_id = chid;
@@ -98,7 +98,7 @@ bool CStreamInstance::Start()
return false; return false;
} }
running = true; running = true;
printf("CStreamInstance::Start: %llx\n", channel_id); printf("CStreamInstance::Start: %" PRIx64 "\n", channel_id);
return (OpenThreads::Thread::start() == 0); return (OpenThreads::Thread::start() == 0);
} }
@@ -107,7 +107,7 @@ bool CStreamInstance::Stop()
if (!running) if (!running)
return false; return false;
printf("CStreamInstance::Stop: %llx\n", channel_id); printf("CStreamInstance::Stop: %" PRIx64 "\n", channel_id);
running = false; running = false;
return (OpenThreads::Thread::join() == 0); return (OpenThreads::Thread::join() == 0);
} }
@@ -127,7 +127,7 @@ bool CStreamInstance::Send(ssize_t r)
if (ret != r) { if (ret != r) {
if (r < 0) if (r < 0)
perror("send"); perror("send");
printf("send err, fd %d: %d\n", *it, r); printf("send err, fd %d: %d\n", *it, (int)r);
} }
} }
mutex.unlock(); mutex.unlock();
@@ -145,7 +145,7 @@ void CStreamInstance::AddClient(int clientfd)
{ {
mutex.lock(); mutex.lock();
fds.insert(clientfd); fds.insert(clientfd);
printf("CStreamInstance::AddClient: %d (count %d)\n", clientfd, fds.size()); printf("CStreamInstance::AddClient: %d (count %d)\n", clientfd, (int)fds.size());
mutex.unlock(); mutex.unlock();
} }
@@ -154,13 +154,13 @@ void CStreamInstance::RemoveClient(int clientfd)
mutex.lock(); mutex.lock();
fds.erase(clientfd); fds.erase(clientfd);
close(clientfd); close(clientfd);
printf("CStreamInstance::RemoveClient: %d (count %d)\n", clientfd, fds.size()); printf("CStreamInstance::RemoveClient: %d (count %d)\n", clientfd, (int)fds.size());
mutex.unlock(); mutex.unlock();
} }
void CStreamInstance::run() void CStreamInstance::run()
{ {
printf("CStreamInstance::run: %llx\n", channel_id); printf("CStreamInstance::run: %" PRIx64 "\n", channel_id);
#ifndef HAVE_COOL_HARDWARE #ifndef HAVE_COOL_HARDWARE
/* right now, only one stream is possible anyway and it is not possible /* right now, only one stream is possible anyway and it is not possible
@@ -198,7 +198,7 @@ void CStreamInstance::run()
CCamManager::getInstance()->Stop(channel_id, CCamManager::STREAM); CCamManager::getInstance()->Stop(channel_id, CCamManager::STREAM);
printf("CStreamInstance::run: exiting %llx (%d fds)\n", channel_id, fds.size()); printf("CStreamInstance::run: exiting %" PRIx64 " (%d fds)\n", channel_id, (int)fds.size());
Close(); Close();
delete dmx; delete dmx;
@@ -340,12 +340,12 @@ bool CStreamManager::Parse(int fd, stream_pids_t &pids, t_channel_id &chid)
#ifdef ENABLE_MULTI_CHANNEL #ifdef ENABLE_MULTI_CHANNEL
t_channel_id tmpid; t_channel_id tmpid;
bp = &cbuf[5]; bp = &cbuf[5];
if (sscanf(bp, "id=%llx", &tmpid) == 1) { if (sscanf(bp, "id=%" SCNx64, &tmpid) == 1) {
printf("############################# channel_id %llx\n", tmpid); printf("############################# channel_id %" PRIx64 "\n", tmpid);
CZapitChannel * tmpchan = CServiceManager::getInstance()->FindChannel(tmpid); CZapitChannel * tmpchan = CServiceManager::getInstance()->FindChannel(tmpid);
if (tmpchan && (tmpid != chid) && SAME_TRANSPONDER(tmpid, chid)) { if (tmpchan && (tmpid != chid) && SAME_TRANSPONDER(tmpid, chid)) {
printf("############################# channel_id %llx -> zap\n", tmpid); printf("############################# channel_id %" PRIx64 " -> zap\n", tmpid);
bool ret = g_Zapit->zapTo_record(tmpid) > 0; bool ret = g_Zapit->zapTo_record(tmpid) > 0;
if (ret) { if (ret) {
channel = tmpchan; channel = tmpchan;
@@ -354,12 +354,12 @@ bool CStreamManager::Parse(int fd, stream_pids_t &pids, t_channel_id &chid)
} }
} }
if(CRecordManager::getInstance()->RecordingStatus(tmpid)) { if(CRecordManager::getInstance()->RecordingStatus(tmpid)) {
printf("CStreamManager::Parse: channel %llx recorded, aborting..\n", tmpid); printf("CStreamManager::Parse: channel %" PRIx64 " recorded, aborting..\n", tmpid);
return false; return false;
} }
#endif #endif
printf("CStreamManager::Parse: no pids in url, using channel %llx pids\n", chid); printf("CStreamManager::Parse: no pids in url, using channel %" PRIx64 " pids\n", chid);
if(!channel) if(!channel)
return false; return false;
//pids.insert(0); //pids.insert(0);