neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/15947 )

Change subject: add sdp_msg API: SDP parsing/composition
......................................................................


Patch Set 1:

(3 comments)

https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h
File include/osmocom/msc/debug.h:

https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h@38
PS1, Line 38:   size_t len = 64; \
> Makes much more sense having len as a param to avoid almost-sure 
> talloc_realloc on some functions.
you're right


https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h@40
PS1, Line 40:   char *str = (char*)talloc_named_const(ctx, len, #FUNC_BUF 
"_c()"); \
> where does this "ctx" var come from?
it's a required parameter indicated above as foo_name_c(void *ctx,

But hold on, I actually moved this to libosmocore in a more generalized 
fashion, and forgot to apply that here.
Ah I remember now, I also needed this in osmo-hlr for the Distributed GSM task.
I'll submit that libosmocore patch first and use that here as well.

I've taken your points into consideration and submitted 
https://gerrit.osmocom.org/c/libosmocore/+/15957


https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h@63
PS1, Line 63: #define NAME_IMPL(FUNC_C, FUNC_C_ARGS...) \
> So you return a talloc'ed pointer on success and a static string pointer on 
> error? That will break w […]
the point being that I want to use this function in printf() formats, and there 
returning NULL is a crash.



--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931
Gerrit-Change-Number: 15947
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofm...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofm...@sysmocom.de>
Gerrit-CC: laforge <lafo...@osmocom.org>
Gerrit-CC: pespin <pes...@sysmocom.de>
Gerrit-Comment-Date: Mon, 04 Nov 2019 23:59:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pes...@sysmocom.de>
Gerrit-MessageType: comment

Reply via email to