[OpenSER-Devel] [ openser-Patches-1913465 ] dialog from db fixes
SourceForge.net
noreply at sourceforge.net
Thu Mar 13 13:29:17 CET 2008
Patches item #1913465, was opened at 2008-03-13 13:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1913465&group_id=139143
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver 1.3.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stanislaw Pitucha (viraptor)
Assigned to: Nobody/Anonymous (nobody)
Summary: dialog from db fixes
Initial Comment:
Posted in maillist by mistake - reposting:
(Patch made by / please attribute to Ben Smithurst)
@modules/dialog/dlg_db_handler.c:
#define GET_STR_VALUE(_res, _values, _index, _not_null, _unref)\
do{\
if (VAL_NULL((_values)+ (_index))) { \
if (_not_null) {\
if (_unref) unref_dlg(dlg,1);\
continue; \
} else { \
(_res).s = 0; \
(_res).len = 0; \
}\
} else { \
(_res).s = VAL_STR((_values)+ (_index)).s;\
(_res).len = strlen(VAL_STR((_values)+ (_index)).s);\
} \
}while(0);
I guess that "continue" is supposed to skip processing of dialog in load_dialog_info_from_db(), but it won't really work, because continue is only getting out of do{}while() macro loop - it leaves _res uninitialized and continues processing. Fixed by removing "do" and "while" - GET_STR_VALUE isn't used in parent "if" so it's safe currently.
Then there's destroy_dlg() @modules/dialog/dlg_hash.c which doesn't handle dialog timer (if unref_dlg() was ran in previous case) - fixed by adding remove_dlg_timer(&dlg->tl);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1913465&group_id=139143
More information about the Devel
mailing list