Module: kamailio Branch: master Commit: ef55950a9465a7aed4e0a791e1685a112cece63f URL: https://github.com/kamailio/kamailio/commit/ef55950a9465a7aed4e0a791e1685a11...
Author: Carsten Bock carsten@ng-voice.com Committer: Carsten Bock carsten@ng-voice.com Date: 2015-07-04T21:52:32+02:00
ims_usrloc_scscf: Fix return-code in case of memory allocation errors + some debug output
---
Modified: modules/ims_usrloc_scscf/udomain.c
---
Diff: https://github.com/kamailio/kamailio/commit/ef55950a9465a7aed4e0a791e1685a11... Patch: https://github.com/kamailio/kamailio/commit/ef55950a9465a7aed4e0a791e1685a11...
---
diff --git a/modules/ims_usrloc_scscf/udomain.c b/modules/ims_usrloc_scscf/udomain.c index 1c7f748..c82a177 100644 --- a/modules/ims_usrloc_scscf/udomain.c +++ b/modules/ims_usrloc_scscf/udomain.c @@ -589,6 +589,9 @@ int get_impus_from_subscription_as_string(udomain_t* _d, impurecord_t* impu_rec, for (i = 0; i < impu_rec->s->service_profiles_cnt; i++) { for (j = 0; j < impu_rec->s->service_profiles[i].public_identities_cnt; j++) { impi = &(impu_rec->s->service_profiles[i].public_identities[j]); + LM_DBG("Got Record %.*s (%i)\n", impi->public_identity.len, + impi->public_identity.s, impi->public_identity.len); + if (barring < 0) { //get all records bytes_needed += impi->public_identity.len; @@ -608,7 +611,7 @@ int get_impus_from_subscription_as_string(udomain_t* _d, impurecord_t* impu_rec, *impus = (str*) pkg_malloc(len); //TODO: rather put this on the stack... dont' fragment pkg.... if (*impus == 0) { LM_ERR("no more pkg_mem\n"); - return 0; + return 1; } char* ptr = (char*) (*impus + *num_impus);
@@ -734,4 +737,4 @@ void unref_contact_unsafe(ucontact_t* c) { } delete_ucontact(c); } -} \ No newline at end of file +}