]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add descriptive error messages
authorAlan T. DeKok <aland@freeradius.org>
Thu, 20 Dec 2012 19:07:47 +0000 (14:07 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 20 Dec 2012 19:07:47 +0000 (14:07 -0500)
src/main/radclient.c

index f33cf94d7f07b2dc062e701d75145972b1762c6b..ff16466cf21fd615cef60524a801df17535c9d00 100644 (file)
@@ -235,7 +235,7 @@ static int radclient_init(const char *filename)
                 */
                radclient = malloc(sizeof(*radclient));
                if (!radclient) {
-                       perror("radclient: X");
+                       fprintf(stderr, "radclient: Out of memory\n");
                        if (fp != stdin) fclose(fp);
                        return 0;
                }
@@ -243,7 +243,7 @@ static int radclient_init(const char *filename)
 
                radclient->request = rad_alloc(1);
                if (!radclient->request) {
-                       fr_perror("radclient: Y");
+                       fprintf(stderr, "radclient: Out of memory\n");
                        free(radclient);
                        if (fp != stdin) fclose(fp);
                        return 0;
@@ -1148,6 +1148,7 @@ int main(int argc, char **argv)
         *      Walk over the list of filenames, creating the requests.
         */
        if (rbtree_walk(filename_tree, InOrder, filename_walk, NULL) != 0) {
+               fprintf(stderr, "Failed walking over filenames\n");
                exit(1);
        }