Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/BearWare/TeamTalk5
Browse files Browse the repository at this point in the history
  • Loading branch information
bear101 committed Feb 10, 2019
2 parents 24f8ccd + 9c7fbd6 commit 3572742
Show file tree
Hide file tree
Showing 57 changed files with 335 additions and 185 deletions.
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/TeamTalkApp.cpp
Expand Up @@ -190,7 +190,7 @@ BOOL CTeamTalkApp::InitInstance()
if(hRunningTT && info.m_args.GetCount() == 1)
{
BOOL bTTUrl = FALSE;
MsgCmdLine msg = { 0 };
MsgCmdLine msg = {};
for(POSITION pos = info.m_args.GetHeadPosition(); pos != NULL;)
{
szArg = info.m_args.GetNext(pos);
Expand Down
34 changes: 17 additions & 17 deletions Client/TeamTalkClassic/TeamTalkDlg.cpp
Expand Up @@ -281,7 +281,7 @@ void CTeamTalkDlg::UpdateWindowTitle()
{
CString szProfileName = STR_UTF8(m_xmlSettings.GetProfileName());

Channel chan = {0};
Channel chan = {};
TT_GetChannel(ttInst, TT_GetMyChannelID(ttInst), &chan);

//set window title
Expand Down Expand Up @@ -331,7 +331,7 @@ CMessageDlg* CTeamTalkDlg::GetUsersMessageSession(int nUserID, BOOL bCreateNew,
}
else if(bCreateNew)
{
User user = {0}, myself = {0};
User user = {}, myself = {};
TT_GetUser(ttInst, nUserID, &user);
TT_GetUser(ttInst, TT_GetMyUserID(ttInst), &myself);

Expand Down Expand Up @@ -1104,10 +1104,10 @@ void CTeamTalkDlg::OnCommandProc(const TTMessage& msg)
}
else //auto create channel
{
ServerProperties srvprop = {0};
ServerProperties srvprop = {};
TT_GetServerProperties(ttInst, &srvprop);

Channel newchan = {0};
Channel newchan = {};
newchan.nParentID = TT_GetRootChannelID(ttInst);
COPYTTSTR(newchan.szName, STR_UTF8(m_host.szChannel.c_str()));
COPYTTSTR(newchan.szPassword, STR_UTF8(m_host.szChPasswd.c_str()));
Expand Down Expand Up @@ -1517,7 +1517,7 @@ void CTeamTalkDlg::OnChannelUpdate(const TTMessage& msg)
ASSERT(msg.ttType == __CHANNEL);
const Channel& chan = msg.channel;

Channel oldchan = {0};
Channel oldchan = {};
if(!m_wndTree.GetChannel(chan.nChannelID, oldchan))
return;

Expand Down Expand Up @@ -1862,7 +1862,7 @@ void CTeamTalkDlg::OnUserStateChange(const TTMessage& msg)
ASSERT(msg.ttType == __USER);
const User& user = msg.user;

User olduser = {0};
User olduser = {};
m_wndTree.GetUser(user.nUserID, olduser);

m_wndTree.UpdateUser(msg.user);
Expand Down Expand Up @@ -3763,7 +3763,7 @@ void CTeamTalkDlg::OnUpdateUsersViewinfo(CCmdUI *pCmdUI)
void CTeamTalkDlg::OnUsersViewinfo()
{
int nUserID = m_wndTree.GetSelectedUser();
User user = {0};
User user = {};
if( m_wndTree.GetUser(nUserID, user) )
{
CUserInfoDlg dlg;
Expand Down Expand Up @@ -4111,7 +4111,7 @@ void CTeamTalkDlg::OnUpdateChannelsCreatechannel(CCmdUI *pCmdUI)
void CTeamTalkDlg::OnChannelsCreatechannel()
{
CChannelDlg dlg(CChannelDlg::CREATE_CHANNEL);
ServerProperties prop = {0};
ServerProperties prop = {};
TT_GetServerProperties(ttInst, &prop);
dlg.m_nMaxUsers = prop.nMaxUsers;
dlg.m_bEnableAGC = DEFAULT_CHANNEL_AUDIOCONFIG;
Expand All @@ -4125,7 +4125,7 @@ void CTeamTalkDlg::OnChannelsCreatechannel()
else if(nParentID<=0)
nParentID = TT_GetRootChannelID(ttInst);

Channel chan = {0};
Channel chan = {};
chan.nParentID = nParentID;
COPYTTSTR(chan.szName, dlg.m_szChannelname);
COPYTTSTR(chan.szPassword, dlg.m_szChannelPassword);
Expand Down Expand Up @@ -4178,7 +4178,7 @@ void CTeamTalkDlg::OnUpdateChannelsUpdatechannel(CCmdUI *pCmdUI)

void CTeamTalkDlg::OnChannelsUpdatechannel()
{
Channel chan = {0};
Channel chan = {};
if(!TT_GetChannel(ttInst, m_wndTree.GetSelectedChannel(), &chan))
return;

Expand Down Expand Up @@ -4248,7 +4248,7 @@ void CTeamTalkDlg::OnUpdateChannelsDeletechannel(CCmdUI *pCmdUI)
void CTeamTalkDlg::OnChannelsDeletechannel()
{
int channelid = m_wndTree.GetSelectedChannel();
TTCHAR path[TT_STRLEN] = {0};
TTCHAR path[TT_STRLEN] = {};
TT_GetChannelPath(ttInst, channelid, path);
CString s;
s.Format(_T("Are you sure you want to delete channel %s"), path);
Expand Down Expand Up @@ -4428,7 +4428,7 @@ void CTeamTalkDlg::OnTimer(UINT_PTR nIDEvent)
{
case TIMER_ONESECOND_ID :
{
ClientStatistics stats = {0};
ClientStatistics stats = {};
if( (TT_GetFlags(ttInst) & CLIENT_CONNECTED) &&
TT_GetClientStatistics(ttInst, &stats))
{
Expand Down Expand Up @@ -4575,7 +4575,7 @@ void CTeamTalkDlg::OnTimer(UINT_PTR nIDEvent)
{
//only update desktop if there's users in the channel
//(save bandwidth)
Channel my_channel = {0};
Channel my_channel = {};
TT_GetChannel(ttInst, TT_GetMyChannelID(ttInst), &my_channel);
int user_cnt = 0;
if(TT_GetChannelUsers(ttInst, TT_GetMyChannelID(ttInst),
Expand Down Expand Up @@ -5176,7 +5176,7 @@ void CTeamTalkDlg::UpdateGainLevel(int nGain)
if(m_wndGainSlider.GetPos() != nGain)
m_wndGainSlider.SetPos(nGain);

SpeexDSP spxdsp = {0};
SpeexDSP spxdsp = {};
if(TT_GetSoundInputPreprocess(ttInst, &spxdsp) && spxdsp.bEnableAGC)
{
double percent = nGain;
Expand All @@ -5194,7 +5194,7 @@ void CTeamTalkDlg::UpdateGainLevel(int nGain)

void CTeamTalkDlg::UpdateAudioConfig()
{
SpeexDSP spxdsp = {0};
SpeexDSP spxdsp = {};
spxdsp.bEnableAGC = m_xmlSettings.GetAGC(DEFAULT_AGC_ENABLE);
spxdsp.nGainLevel = DEFAULT_AGC_GAINLEVEL;
spxdsp.nMaxIncDBSec = DEFAULT_AGC_INC_MAXDB;
Expand Down Expand Up @@ -5439,7 +5439,7 @@ LRESULT CTeamTalkDlg::OnVideoDlgEnded(WPARAM wParam, LPARAM lParam)
LRESULT CTeamTalkDlg::OnDesktopDlgClosed(WPARAM wParam, LPARAM lParam)
{
CloseDesktopSession(INT32(wParam));
ServerProperties prop = {0};
ServerProperties prop = {};

TT_GetServerProperties(ttInst, &prop);

Expand Down Expand Up @@ -5525,7 +5525,7 @@ void CTeamTalkDlg::OnUpdateServerServerproperties(CCmdUI *pCmdUI)

void CTeamTalkDlg::OnServerServerproperties()
{
ServerProperties prop = {0};
ServerProperties prop = {};
if(!TT_GetServerProperties(ttInst, &prop))
return;

Expand Down
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/gui/AdvancedPage.cpp
Expand Up @@ -66,7 +66,7 @@ void CAdvancedPage::UpdateControls()
int nSelectedIndex = -1;
for(int i=0;i<count;i++)
{
TCHAR buff[TT_STRLEN] = {0};
TCHAR buff[TT_STRLEN] = {};
TT_Mixer_GetWaveInControlName(0, i, buff);
list.AddTail(buff);
if(TT_Mixer_GetWaveInControlSelected(0, i))
Expand Down
8 changes: 4 additions & 4 deletions Client/TeamTalkClassic/gui/ChatRichEditCtrl.cpp
Expand Up @@ -324,10 +324,10 @@ void CChatRichEditCtrl::SetServerInfo(CString szServerName, CString szMOTD)
void CChatRichEditCtrl::SetChannelInfo(int nChannelID)
{
CString szChannelName, szTopic, szDiskQuota;
Channel chan = {0};
TCHAR szChanPath[TT_STRLEN] = {0};
TT_GetChannel(ttInst, nChannelID, &chan);
TT_GetChannelPath(ttInst, nChannelID, szChanPath);
Channel chan = {};
TCHAR szChanPath[TT_STRLEN] = {};
TT_GetChannel(ttInst, nChannelID, &chan);
TT_GetChannelPath(ttInst, nChannelID, szChanPath);

szChannelName = szChanPath;
szTopic = chan.szTopic;
Expand Down
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/gui/FilesListCtrl.cpp
Expand Up @@ -56,7 +56,7 @@ END_MESSAGE_MAP()

void CFilesListCtrl::OnDropFiles(HDROP hDropInfo)
{
TCHAR szFilePath[MAX_PATH] = {0};
TCHAR szFilePath[MAX_PATH] = {};
UINT count = DragQueryFile(hDropInfo, 0xFFFFFFFF, szFilePath, MAX_PATH);
for(UINT i=0;i<count;i++)
{
Expand Down
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/gui/FilesTab.cpp
Expand Up @@ -82,7 +82,7 @@ void CFilesTab::AddFile(int nChannelID, int nFileID)
if(nChannelID != m_nChannelID)
return;

RemoteFile remotefile = {0};
RemoteFile remotefile = {};
int count = m_wndFiles.GetItemCount();
if( TT_GetChannelFile(ttInst, nChannelID, nFileID, &remotefile) &&
GetIndexFromFileID(nFileID) == -1)
Expand Down
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/gui/GenerateTTFileDlg.cpp
Expand Up @@ -114,7 +114,7 @@ BOOL CGenerateTTFileDlg::OnInitDialog()

void CGenerateTTFileDlg::LoadVideoFormats()
{
VideoFormat fmt = {0};
VideoFormat fmt = {};
m_vidcap_fmts.push_back(fmt);

fmt.picFourCC = FOURCC_RGB32;
Expand Down
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/gui/KeyCompDlg.cpp
Expand Up @@ -130,7 +130,7 @@ CString CKeyCompDlg::GetHotkeyString(teamtalk::HotKey hotkey)
if(hotkey.empty())
return s;

TTCHAR key[TT_STRLEN] = {0};
TTCHAR key[TT_STRLEN] = {};
size_t i;
for(i=0;i<hotkey.size()-1;i++)
{
Expand Down
6 changes: 3 additions & 3 deletions Client/TeamTalkClassic/gui/OnlineUsersDlg.cpp
Expand Up @@ -171,17 +171,17 @@ BOOL COnlineUsersDlg::PreTranslateMessage(MSG* pMsg)

void COnlineUsersDlg::MenuCommand(UINT uCmd)
{
int nUserID = 0;
int nUserID = 0;
int count = m_wndUsers.GetItemCount();
for(int i=0;i<count;i++)
{
if(m_wndUsers.GetItemState(i, LVIS_SELECTED) == LVIS_SELECTED)
nUserID = INT32(m_wndUsers.GetItemData(i));
}

User user = {0};
User user = {};
TT_GetUser(ttInst, nUserID, &user);
Channel chan = {0};
Channel chan = {};
TT_GetChannel(ttInst, user.nChannelID, &chan);

switch(uCmd)
Expand Down
10 changes: 5 additions & 5 deletions Client/TeamTalkClassic/gui/SessionTreeCtrl.cpp
Expand Up @@ -417,7 +417,7 @@ int CSessionTreeCtrl::GetSelectedChannel(bool bIncludeUserChan/* = false*/) cons
if(bIncludeUserChan && IsUser(img))
{
int nUserID = (GetItemData(h) & ID_ITEMDATA);
User user = {0};
User user = {};
if(GetUser(nUserID, user))
return user.nChannelID;
}
Expand Down Expand Up @@ -896,7 +896,7 @@ void CSessionTreeCtrl::SetSortOrder(SortOrder order)

BOOL CSessionTreeCtrl::GetChannel(int nChannelID, Channel& outChan) const
{
Channel chan = {0};
Channel chan = {};
auto ite = m_channels.find(nChannelID);
if(ite != m_channels.end())
{
Expand Down Expand Up @@ -1006,7 +1006,7 @@ CString CSessionTreeCtrl::GetChannelText(int nChannelID) const
auto ite = m_channels.find(nChannelID);
if(ite != m_channels.end())
{
ServerProperties prop = {0};
ServerProperties prop = {};
TT_GetServerProperties(ttInst, &prop);
if(IsShowingUserCount())
{
Expand Down Expand Up @@ -1119,7 +1119,7 @@ void CSessionTreeCtrl::OnLButtonUp(UINT nFlags, CPoint point)
else
{
int userid = (GetItemData(m_hItemDrop) & ID_ITEMDATA);
User user = {0};
User user = {};
TT_GetUser(ttInst, userid, &user);
nChannelID = user.nChannelID;
}
Expand All @@ -1133,7 +1133,7 @@ void CSessionTreeCtrl::OnLButtonUp(UINT nFlags, CPoint point)
void CSessionTreeCtrl::SortItem(HTREEITEM hParentItem)
{
//set up sorting
TVSORTCB tvs = {0};
TVSORTCB tvs = {};
// Sort the tree control's items using my
// callback procedure.
tvs.hParent = hParentItem;
Expand Down
6 changes: 3 additions & 3 deletions Client/TeamTalkClassic/gui/SoundSysPage.cpp
Expand Up @@ -336,7 +336,7 @@ BOOL CSoundSysPage::StartTest()
int nChannels = 1;
const SoundDevice& in_dev = ii->second;

SpeexDSP spxdsp = {0};
SpeexDSP spxdsp = {};
spxdsp.bEnableAGC = DEFAULT_AGC_ENABLE;
spxdsp.nGainLevel = DEFAULT_AGC_GAINLEVEL;
spxdsp.nMaxIncDBSec = DEFAULT_AGC_INC_MAXDB;
Expand Down Expand Up @@ -400,7 +400,7 @@ void CSoundSysPage::UpdateSoundControls()

sounddevs_t::const_iterator ii;
CString szInputSampleRates, szOutputSampleRates;
SoundDevice in_dev = {0};
SoundDevice in_dev = {};
ii = m_SoundDevices.find(m_nInputDevice);
if(ii != m_SoundDevices.end())
{
Expand All @@ -415,7 +415,7 @@ void CSoundSysPage::UpdateSoundControls()
}

CString sound3d;
SoundDevice out_dev = {0};
SoundDevice out_dev = {};
ii = m_SoundDevices.find(m_nOutputDevice);
if(ii != m_SoundDevices.end())
{
Expand Down
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/gui/UserAccountsDlg.cpp
Expand Up @@ -176,7 +176,7 @@ void CUserAccountsDlg::OnBnClickedButtonNew()

void CUserAccountsDlg::OnBnClickedButtonAdd()
{
UserAccount account = {0};
UserAccount account = {};
m_wndUsername.GetWindowText(account.szUsername, TT_STRLEN);
m_wndPassword.GetWindowText(account.szPassword, TT_STRLEN);

Expand Down
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/gui/UserDesktopDlg.cpp
Expand Up @@ -182,7 +182,7 @@ BOOL CUserDesktopDlg::OnInitDialog()
SetWindowText(_T("Local Desktop"));
else
{
User user = {0};
User user = {};
TT_GetUser(ttInst, m_nUserID, &user);
SetWindowText(CString(_T("Desktop - ")) + GetDisplayName(user));
}
Expand Down
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/gui/UserVideoDlg.cpp
Expand Up @@ -191,7 +191,7 @@ BOOL CUserVideoDlg::OnInitDialog()
SetWindowText(_T("Local Video"));
else
{
User user = {0};
User user = {};
TT_GetUser(ttInst, (m_nUserID & VIDEOTYPE_USERMASK), &user);
SetWindowText(CString(_T("Video - ")) + GetDisplayName(user));
}
Expand Down
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/settings/MyStd.cpp
Expand Up @@ -49,7 +49,7 @@ void replace_all(string& target, const string& to_find, const string& replacemen

string i2str(int i)
{
char buf[20] = {0};
char buf[20] = {};
sprintf(buf, "%d", i);
return string(buf);
}
Expand Down
2 changes: 1 addition & 1 deletion Client/TeamTalkClassic/wizard/WizSoundSysPage.cpp
Expand Up @@ -127,7 +127,7 @@ BOOL CWizSoundSysPage::OnInitDialog()
int nSelectedIndex = -1;
for(int i=0;i<count;i++)
{
TCHAR buff[TT_STRLEN] = {0};
TCHAR buff[TT_STRLEN] = {};
TT_Mixer_GetWaveInControlName(0, i, buff);
list.AddTail(buff);
if(TT_Mixer_GetWaveInControlSelected(0, i))
Expand Down
2 changes: 1 addition & 1 deletion Client/qtTeamTalk/channeldlg.cpp
Expand Up @@ -359,7 +359,7 @@ void ChannelDlg::slotUpdateSliderLabels()

void ChannelDlg::slotUpdateChannelPath(const QString& str)
{
TTCHAR path[TT_STRLEN] = {0};
TTCHAR path[TT_STRLEN] = {};
if(TT_GetChannelPath(ttInst, m_channel.nParentID, path))
ui.chanpathLabel->setText(_Q(path) + str);
else
Expand Down

0 comments on commit 3572742

Please sign in to comment.