Change in osmo-hlr[master]: osmo-mslookup-client: fix segfault for respond_error() caller

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 gerrit-no-reply at lists.osmocom.org
Wed Jun 3 16:39:04 UTC 2020


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/18651 )


Change subject: osmo-mslookup-client: fix segfault for respond_error() caller
......................................................................

osmo-mslookup-client: fix segfault for respond_error() caller

respond_error() passes r == 0. On error, consider it the last response for that
request.

Change-Id: I1acb0b8aa00c098d1f1f1cc17035daa38ce29fd3
---
M src/mslookup/osmo-mslookup-client.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/51/18651/1

diff --git a/src/mslookup/osmo-mslookup-client.c b/src/mslookup/osmo-mslookup-client.c
index 4a9e587..a200a7e 100644
--- a/src/mslookup/osmo-mslookup-client.c
+++ b/src/mslookup/osmo-mslookup-client.c
@@ -584,11 +584,11 @@
 	llist_for_each_entry_safe(c, n, &globals.socket_clients, entry) {
 		if (!strcmp(query_str, c->query_str)) {
 			socket_client_respond_result(c, g_buf);
-			if (r->last)
+			if (!r || r->last)
 				socket_client_close(c);
 		}
 	}
-	if (r->last)
+	if (!r || r->last)
 		globals.requests_handled++;
 }
 

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I1acb0b8aa00c098d1f1f1cc17035daa38ce29fd3
Gerrit-Change-Number: 18651
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200603/4841f2d7/attachment.htm>


More information about the gerrit-log mailing list