summaryrefslogtreecommitdiff
path: root/tipper
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-06-25 00:55:58 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-06-25 00:55:58 +0000
commit239ad94877dcf2ef148143ab3c7debde94dbb6cc (patch)
tree364a4bebc2864e397bff3212f4722523ee811eb1 /tipper
parent65b709741e177e28dd33fecb924f127a90b0c0ec (diff)
fix for memory links using the (currently unused) alternate status message retrieval service
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@209 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'tipper')
-rw-r--r--tipper/popwin.cpp14
-rw-r--r--tipper/version.h2
2 files changed, 9 insertions, 7 deletions
diff --git a/tipper/popwin.cpp b/tipper/popwin.cpp
index 2189517..7ff1cee 100644
--- a/tipper/popwin.cpp
+++ b/tipper/popwin.cpp
@@ -99,15 +99,16 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if(status >= ID_STATUS_OFFLINE && status <= ID_STATUS_IDLE) {
TCHAR *swzText = 0;
char *status_msg = 0;
- if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGET))
- swzText = _tcsdup((TCHAR *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGET, (LPARAM)status, (WPARAM)pwd->clcit.proto));
- else if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGE))
+ if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGET)) {
+ TCHAR *temp = (TCHAR *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGET, (LPARAM)status, (WPARAM)pwd->clcit.proto);
+ swzText = _tcsdup(temp);
+ mir_free(temp);
+ } else if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGE))
status_msg = (char *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGE, (LPARAM)status, (WPARAM)pwd->clcit.proto);
else
status_msg = (char *)CallService(MS_AWAYMSG_GETSTATUSMSG, status, 0);
- if(status_msg)
- swzText = a2t(status_msg);
+ if(status_msg) swzText = a2t(status_msg);
if(swzText) {
StripBBCodesInPlace(swzText);
@@ -119,8 +120,9 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
pwd->rows[pwd->row_count].line_above = true;
pwd->row_count++;
- mir_free(status_msg);
}
+
+ if(status_msg) mir_free(status_msg);
}
} else if(pwd->clcit.text) {
pwd->text_tip = true;
diff --git a/tipper/version.h b/tipper/version.h
index 31f0f07..cc872e3 100644
--- a/tipper/version.h
+++ b/tipper/version.h
@@ -4,7 +4,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 4
#define __RELEASE_NUM 0
-#define __BUILD_NUM 5
+#define __BUILD_NUM 6
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM