Module: sip-router
Branch: 3.1
Commit: 270a5cfcabaa1be16ccc5cf4c5a3da439fe7d644
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=270a5cf…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Wed Apr 27 12:21:11 2011 +0300
modules_k/presence : Fixed a bug caused by an incorrect Macro
the macro expanded to incorrect results when called in statements like
if(cond) COND_COPY(...);
(cherry picked from commit 41b11916eec28133af499b7368940504c7c5834d)
---
modules_k/presence/hash.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules_k/presence/hash.h b/modules_k/presence/hash.h
index 82eb23c..ba9a0ab 100644
--- a/modules_k/presence/hash.h
+++ b/modules_k/presence/hash.h
@@ -50,10 +50,12 @@ struct presentity;
goto error
#define CONT_COPY(buf, dest, source)\
+ do{ \
dest.s= (char*)buf+ size;\
memcpy(dest.s, source.s, source.len);\
dest.len= source.len;\
- size+= source.len;
+ size+= source.len; \
+ } while(0);
#define PKG_MEM_TYPE 1<< 1
#define SHM_MEM_TYPE 1<< 2