This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/10746 Change subject: mgcp_client_test: cosmetically re-arrange reply_to() args ...................................................................... mgcp_client_test: cosmetically re-arrange reply_to() args I want to test arbitrary length Conn IDs ('I:'), and hence don't want to pass the conn_id as int, but rather just include it in the message string. Prepare for that by eliminating the extra conn_id arg and just pass a params string. Change-Id: Ib2e718dda3aa1f6e9979dee823d973dd002e2318 --- M tests/mgcp_client/mgcp_client_test.c 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/46/10746/1 diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 2662fc1..84ba3b4 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -77,14 +77,14 @@ struct mgcp_client *mgcp = NULL; static int reply_to(mgcp_trans_id_t trans_id, int code, const char *comment, - int conn_id, const char *params) + const char *params) { static char compose[4096 - 128]; int len; len = snprintf(compose, sizeof(compose), - "%d %u %s\r\nI: %d\n\n%s", - code, trans_id, comment, conn_id, params); + "%d %u %s\r\n%s", + code, trans_id, comment, params); OSMO_ASSERT(len < sizeof(compose)); OSMO_ASSERT(len > 0); @@ -148,7 +148,8 @@ msg = mgcp_msg_crcx(mgcp, 23, 42, MGCP_CONN_LOOPBACK); trans_id = dummy_mgcp_send(msg); - reply_to(trans_id, 200, "OK", 1, + reply_to(trans_id, 200, "OK", + "I: 1\n\n" "v=0\r\n" "o=- 1 23 IN IP4 10.9.1.120\r\n" "s=-\r\n" @@ -335,7 +336,7 @@ OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == 0); fprintf(stderr, "- late response gets discarded\n"); - OSMO_ASSERT(reply_to(trans_id, 200, "OK", 1, "v=0\r\n") == -ENOENT); + OSMO_ASSERT(reply_to(trans_id, 200, "OK", "I: 1\n\nv=0\r\n") == -ENOENT); fprintf(stderr, "- canceling again does nothing\n"); OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == -ENOENT); -- To view, visit https://gerrit.osmocom.org/10746 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2e718dda3aa1f6e9979dee823d973dd002e2318 Gerrit-Change-Number: 10746 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180903/e72629b8/attachment.htm>