logging: make sure to add the internal categories, as intended
authorHarald Welte <laforge@gnumonks.org>
Mon, 27 Jun 2011 12:00:03 +0000 (14:00 +0200)
committerHarald Welte <laforge@gnumonks.org>
Mon, 27 Jun 2011 21:17:35 +0000 (23:17 +0200)
src/logging.c

index 8fd2e00..c05b523 100644 (file)
@@ -637,4 +637,10 @@ int log_init(const struct log_info *inf, void *ctx)
        }
 
        /* copy over the library part */
+       for (i = 0; i < ARRAY_SIZE(internal_cat); i++) {
+               memcpy(&osmo_log_info->cat[inf->num_cat+i],
+                       &internal_cat[i], sizeof(struct log_info_cat));
+       }
+
+       return 0;
 }